mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Tiffany Y. Yang" <ynaffit@google.com>
To: Carlos Llamas <cmllamas@google.com>
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Arve Hjønnevåg" <arve@android.com>,
	"Todd Kjos" <tkjos@android.com>,
	"Martijn Coenen" <maco@android.com>,
	"Joel Fernandes" <joel@joelfernandes.org>,
	"Christian Brauner" <brauner@kernel.org>,
	"Suren Baghdasaryan" <surenb@google.com>,
	"Alice Ryhl" <aliceryhl@google.com>,
	linux-kernel@vger.kernel.org, kernel-team@android.com,
	stable@vger.kernel.org
Subject: Re: [PATCH] binder: fix offset calculation in debug log
Date: Tue, 25 Mar 2025 20:25:08 +0000	[thread overview]
Message-ID: <dbx81pukx3h7.fsf@ynaffit-start.c.googlers.com> (raw)
In-Reply-To: <20250325184902.587138-1-cmllamas@google.com> (Carlos Llamas's message of "Tue, 25 Mar 2025 18:49:00 +0000")

Carlos Llamas <cmllamas@google.com> writes:

> The vma start address should be substracted from the buffer's user data
> address and not the other way around.
>
> Cc: Tiffany Y. Yang <ynaffit@google.com>
> Cc: stable@vger.kernel.org
> Fixes: 162c79731448 ("binder: avoid user addresses in debug logs")
> Signed-off-by: Carlos Llamas <cmllamas@google.com>

Reviewed-by: Tiffany Y. Yang <ynaffit@google.com>

> ---
>  drivers/android/binder.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/android/binder.c b/drivers/android/binder.c
> index 76052006bd87..5fc2c8ee61b1 100644
> --- a/drivers/android/binder.c
> +++ b/drivers/android/binder.c
> @@ -6373,7 +6373,7 @@ static void print_binder_transaction_ilocked(struct seq_file *m,
>  		seq_printf(m, " node %d", buffer->target_node->debug_id);
>  	seq_printf(m, " size %zd:%zd offset %lx\n",
>  		   buffer->data_size, buffer->offsets_size,
> -		   proc->alloc.vm_start - buffer->user_data);
> +		   buffer->user_data - proc->alloc.vm_start);
>  }
>  
>  static void print_binder_work_ilocked(struct seq_file *m,

      reply	other threads:[~2025-03-25 20:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-25 18:49 Carlos Llamas
2025-03-25 20:25 ` Tiffany Y. Yang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dbx81pukx3h7.fsf@ynaffit-start.c.googlers.com \
    --to=ynaffit@google.com \
    --cc=aliceryhl@google.com \
    --cc=arve@android.com \
    --cc=brauner@kernel.org \
    --cc=cmllamas@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=joel@joelfernandes.org \
    --cc=kernel-team@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maco@android.com \
    --cc=stable@vger.kernel.org \
    --cc=surenb@google.com \
    --cc=tkjos@android.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®