[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9FD5FF49-6C8D-4073-9CE5-EA19C607FAD2@kernel.org>
Date: Fri, 09 Feb 2024 22:20:22 -0800
From: Kees Cook <kees@...nel.org>
To: Alice Ryhl <aliceryhl@...gle.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
CC: Trevor Gross <tmgross@...ch.edu>, Miguel Ojeda <ojeda@...nel.org>,
Alex Gaynor <alex.gaynor@...il.com>,
Wedson Almeida Filho <wedsonaf@...il.com>, Boqun Feng <boqun.feng@...il.com>,
Gary Guo <gary@...yguo.net>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Benno Lossin <benno.lossin@...ton.me>,
Andreas Hindborg <a.hindborg@...sung.com>, Kees Cook <keescook@...omium.org>,
Al Viro <viro@...iv.linux.org.uk>, Andrew Morton <akpm@...ux-foundation.org>,
Arve Hjønnevåg <arve@...roid.com>,
Todd Kjos <tkjos@...roid.com>, Martijn Coenen <maco@...roid.com>,
Joel Fernandes <joel@...lfernandes.org>, Carlos Llamas <cmllamas@...gle.com>,
Suren Baghdasaryan <surenb@...gle.com>, Arnd Bergmann <arnd@...db.de>,
linux-mm@...ck.org, linux-kernel@...r.kernel.org,
rust-for-linux@...r.kernel.org, Christian Brauner <brauner@...nel.org>
Subject: Re: [PATCH 1/3] rust: add userspace pointers
On February 8, 2024 7:41:52 AM PST, Alice Ryhl <aliceryhl@...gle.com> wrote:
>On Thu, Feb 8, 2024 at 4:35 PM Greg Kroah-Hartman
><gregkh@...uxfoundation.org> wrote:
>>
>> On Thu, Feb 08, 2024 at 01:53:20PM +0100, Alice Ryhl wrote:
>> > > Is some sort of `Debug` implementation useful?
>> >
>> > Leaking pointer addresses in logs is frowned upon in the kernel, so I
>> > don't think we should include that.
>>
>> s/frowned upon/forbidden/ :)
>
>:)
>
>> Along those lines, you all are tieing in the "I want to print a pointer,
>> so hash it properly before I do so" logic from rust like we have in c,
>> right? Ideally you'd use the same logic if at all possible.
>>
>> If not, that probably needs to be done so that you don't accidentally
>> start leaking things.
>
>I don't know what the status of this is. For anything I've added, I've
>just made it entirely impossible to print addresses, hashed or not.
Thank you! That is certainly the preferred[1] approach. :)
-Kees
[1] https://www.kernel.org/doc/html/next/process/deprecated.html#p-format-specifier
--
Kees Cook
Powered by blists - more mailing lists