[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZWmEv6-OBEZ08vy5@google.com>
Date: Fri, 1 Dec 2023 07:01:19 +0000
From: Carlos Llamas <cmllamas@...gle.com>
To: Alice Ryhl <aliceryhl@...gle.com>
Cc: Arve Hjønnevåg <arve@...roid.com>,
Christian Brauner <brauner@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Joel Fernandes <joel@...lfernandes.org>,
kernel-team@...roid.com, linux-kernel@...r.kernel.org,
Martijn Coenen <maco@...roid.com>,
Suren Baghdasaryan <surenb@...gle.com>,
Todd Kjos <tkjos@...roid.com>
Subject: Re: [PATCH 08/21] binder: keep vma addresses type as unsigned long
On Tue, Nov 07, 2023 at 09:08:13AM +0000, Alice Ryhl wrote:
> Carlos Llamas <cmllamas@...gle.com> writes:
> > - seq_printf(m, " size %zd:%zd data %pK\n",
> > + seq_printf(m, " size %zd:%zd data %lx\n",
> > buffer->data_size, buffer->offsets_size,
> > buffer->user_data);
>
> This changes all of the print operations to use %lx instead of %pK,
> which means that the addresses are no longer being hidden when using
> kptr_restrict.
>
> Since the pointers are all userspace pointers, it's not clear to me what
> the consequences of this are. However, I'd like to confirm whether this
> is an intentional change?
I confirm the change was intentional, we are giving the impression that
these are kernel pointers when they are not. However, I do think your
concern is valid. I've added a patch to v2 to deal with this.
I can tell you we are already logging the unhashed userspace addresses
in other places and we should probably fix those too.
--
Carlos Llamas
Powered by blists - more mailing lists