aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Kjos <tkjos@android.com>2018-02-07 13:57:37 -0800
committerMartijn Coenen <maco@android.com>2018-07-17 11:14:23 +0200
commitf540ce029f50fff95d137f4130924839d9ef82cf (patch)
tree9b55b0187ab1b05577db6b7c5f883cf7f4a69ded
parent558ee9362338560772b003407a8440a08ce72899 (diff)
downloadlinux-linaro-stable-f540ce029f50fff95d137f4130924839d9ef82cf.tar.gz
UPSTREAM: binder: replace "%p" with "%pK"
The format specifier "%p" can leak kernel addresses. Use "%pK" instead. There were 4 remaining cases in binder.c. Signed-off-by: Todd Kjos <tkjos@google.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (cherry picked from commit 8ca86f1639ec5890d400fff9211aca22d0a392eb) Change-Id: I309241853c53bcdfa65c17cb05876e786597afdd
-rw-r--r--drivers/android/binder.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/android/binder.c b/drivers/android/binder.c
index e85ba20d2994..44530d62aa0d 100644
--- a/drivers/android/binder.c
+++ b/drivers/android/binder.c
@@ -2350,7 +2350,7 @@ static void binder_transaction_buffer_release(struct binder_proc *proc,
int debug_id = buffer->debug_id;
binder_debug(BINDER_DEBUG_TRANSACTION,
- "%d buffer release %d, size %zd-%zd, failed at %p\n",
+ "%d buffer release %d, size %zd-%zd, failed at %pK\n",
proc->pid, buffer->debug_id,
buffer->data_size, buffer->offsets_size, failed_at);
@@ -3886,7 +3886,7 @@ static int binder_thread_write(struct binder_proc *proc,
}
}
binder_debug(BINDER_DEBUG_DEAD_BINDER,
- "%d:%d BC_DEAD_BINDER_DONE %016llx found %p\n",
+ "%d:%d BC_DEAD_BINDER_DONE %016llx found %pK\n",
proc->pid, thread->pid, (u64)cookie,
death);
if (death == NULL) {
@@ -5236,7 +5236,7 @@ static void print_binder_transaction_ilocked(struct seq_file *m,
spin_lock(&t->lock);
to_proc = t->to_proc;
seq_printf(m,
- "%s %d: %p from %d:%d to %d:%d code %x flags %x pri %d:%d r%d",
+ "%s %d: %pK from %d:%d to %d:%d code %x flags %x pri %d:%d r%d",
prefix, t->debug_id, t,
t->from ? t->from->proc->pid : 0,
t->from ? t->from->pid : 0,
@@ -5261,7 +5261,7 @@ static void print_binder_transaction_ilocked(struct seq_file *m,
}
if (buffer->target_node)
seq_printf(m, " node %d", buffer->target_node->debug_id);
- seq_printf(m, " size %zd:%zd data %p\n",
+ seq_printf(m, " size %zd:%zd data %pK\n",
buffer->data_size, buffer->offsets_size,
buffer->data);
}