diff options
author | Todd Kjos <tkjos@google.com> | 2020-11-21 02:37:43 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-12-09 17:41:21 +0300 |
commit | 0f966cba95c78029f491b433ea95ff38f414a761 (patch) | |
tree | 1cf9aeed5b3ffbf4a82d61f6be3e8a10055ef914 /drivers/android/binder.c | |
parent | d1b928ee1cfa965a3327bbaa59bfa005d97fa0fe (diff) | |
download | linux-0f966cba95c78029f491b433ea95ff38f414a761.tar.xz |
binder: add flag to clear buffer on txn complete
Add a per-transaction flag to indicate that the buffer
must be cleared when the transaction is complete to
prevent copies of sensitive data from being preserved
in memory.
Signed-off-by: Todd Kjos <tkjos@google.com>
Link: https://lore.kernel.org/r/20201120233743.3617529-1-tkjos@google.com
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/android/binder.c')
-rw-r--r-- | drivers/android/binder.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/android/binder.c b/drivers/android/binder.c index 20b08f52e788..1338209f9f86 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c @@ -2756,6 +2756,7 @@ static void binder_transaction(struct binder_proc *proc, t->buffer->debug_id = t->debug_id; t->buffer->transaction = t; t->buffer->target_node = target_node; + t->buffer->clear_on_free = !!(t->flags & TF_CLEAR_BUF); trace_binder_transaction_alloc_buf(t->buffer); if (binder_alloc_copy_user_to_buffer( |