diff options
author | Todd Kjos <tkjos@android.com> | 2018-02-07 16:57:37 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-02-16 05:16:38 -0500 |
commit | 8ca86f1639ec5890d400fff9211aca22d0a392eb (patch) | |
tree | d8422351633e988f4bdde1bd14dbf60d29cac502 | |
parent | e46a3b3ba7509cb7fda0e07bc7c63a2cd90f579b (diff) |
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>
-rw-r--r-- | drivers/android/binder.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/android/binder.c b/drivers/android/binder.c index 31322e9a235d..a85f9033b57e 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c | |||
@@ -2199,7 +2199,7 @@ static void binder_transaction_buffer_release(struct binder_proc *proc, | |||
2199 | int debug_id = buffer->debug_id; | 2199 | int debug_id = buffer->debug_id; |
2200 | 2200 | ||
2201 | binder_debug(BINDER_DEBUG_TRANSACTION, | 2201 | binder_debug(BINDER_DEBUG_TRANSACTION, |
2202 | "%d buffer release %d, size %zd-%zd, failed at %p\n", | 2202 | "%d buffer release %d, size %zd-%zd, failed at %pK\n", |
2203 | proc->pid, buffer->debug_id, | 2203 | proc->pid, buffer->debug_id, |
2204 | buffer->data_size, buffer->offsets_size, failed_at); | 2204 | buffer->data_size, buffer->offsets_size, failed_at); |
2205 | 2205 | ||
@@ -3711,7 +3711,7 @@ static int binder_thread_write(struct binder_proc *proc, | |||
3711 | } | 3711 | } |
3712 | } | 3712 | } |
3713 | binder_debug(BINDER_DEBUG_DEAD_BINDER, | 3713 | binder_debug(BINDER_DEBUG_DEAD_BINDER, |
3714 | "%d:%d BC_DEAD_BINDER_DONE %016llx found %p\n", | 3714 | "%d:%d BC_DEAD_BINDER_DONE %016llx found %pK\n", |
3715 | proc->pid, thread->pid, (u64)cookie, | 3715 | proc->pid, thread->pid, (u64)cookie, |
3716 | death); | 3716 | death); |
3717 | if (death == NULL) { | 3717 | if (death == NULL) { |
@@ -5042,7 +5042,7 @@ static void print_binder_transaction_ilocked(struct seq_file *m, | |||
5042 | spin_lock(&t->lock); | 5042 | spin_lock(&t->lock); |
5043 | to_proc = t->to_proc; | 5043 | to_proc = t->to_proc; |
5044 | seq_printf(m, | 5044 | seq_printf(m, |
5045 | "%s %d: %p from %d:%d to %d:%d code %x flags %x pri %ld r%d", | 5045 | "%s %d: %pK from %d:%d to %d:%d code %x flags %x pri %ld r%d", |
5046 | prefix, t->debug_id, t, | 5046 | prefix, t->debug_id, t, |
5047 | t->from ? t->from->proc->pid : 0, | 5047 | t->from ? t->from->proc->pid : 0, |
5048 | t->from ? t->from->pid : 0, | 5048 | t->from ? t->from->pid : 0, |
@@ -5066,7 +5066,7 @@ static void print_binder_transaction_ilocked(struct seq_file *m, | |||
5066 | } | 5066 | } |
5067 | if (buffer->target_node) | 5067 | if (buffer->target_node) |
5068 | seq_printf(m, " node %d", buffer->target_node->debug_id); | 5068 | seq_printf(m, " node %d", buffer->target_node->debug_id); |
5069 | seq_printf(m, " size %zd:%zd data %p\n", | 5069 | seq_printf(m, " size %zd:%zd data %pK\n", |
5070 | buffer->data_size, buffer->offsets_size, | 5070 | buffer->data_size, buffer->offsets_size, |
5071 | buffer->data); | 5071 | buffer->data); |
5072 | } | 5072 | } |