From: Timur Tabi <timur@kernel.org>
To: Vlastimil Babka <vbabka@suse.cz>, Petr Mladek <pmladek@suse.com>,
Steven Rostedt <rostedt@goodmis.org>,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
willy@infradead.org, akpm@linux-foundation.org,
torvalds@linux-foundation.org, roman.fietze@magna.com,
keescook@chromium.org, john.ogness@linutronix.de,
akinobu.mita@gmail.com
Subject: Re: [PATCH][RESEND] lib/vsprintf: make-printk-non-secret printks all addresses as unhashed
Date: Fri, 5 Feb 2021 12:25:22 -0600 [thread overview]
Message-ID: <d6223371-a5e7-28ac-704c-0e3d5b7ea713@kernel.org> (raw)
In-Reply-To: <3baace45-38af-a59b-c376-9a4c39a17b2d@suse.cz>
On 2/5/21 4:59 AM, Vlastimil Babka wrote:
> Thanks a lot. Should this also affect %pK though? IIUC, there's currently no way
> to achieve non-mangled %pK in all cases, even with the most permissive
> kptr_restrict=1 setting:
> - in IRQ, there's "pK-error" instead
> - in a context of non-CAP_SYSLOG process, nulls are printed
Hmmm.. I thought %pK prints an unhashed pointer when the user is root,
at least in situations where the user can be known (e.g. during an ioctl
call).
> Yes, neither should matter if %pK were only used for prints that generate
> content of some kind of /proc file read by a CAP_SYSLOG process, but that
> doesn't seem to be the case and there are %pK used for printing to dmesg too...
I thought about that. On one hand, people who use %pK probably really
wanted a hashed pointer printed. On the other hand, I agree that %pK
should not be used for dmesg prints.
I get the feeling that some (most?) people who use %pK don't really
understand how it's supposed to be used.
I can extend make-printk-non-secret to %pK if everyone agrees.
next prev parent reply other threads:[~2021-02-05 18:29 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-02 21:36 [PATCH][RESEND] lib/vsprintf: make-printk-non-secret printks all addresses as unhashed Timur Tabi
2021-02-03 3:24 ` Sergey Senozhatsky
2021-02-03 3:30 ` Randy Dunlap
2021-02-03 9:54 ` Petr Mladek
2021-02-03 13:31 ` Petr Mladek
2021-02-03 18:58 ` Timur Tabi
2021-02-03 19:30 ` Andy Shevchenko
2021-02-03 20:02 ` Kees Cook
2021-02-03 20:25 ` Steven Rostedt
2021-02-03 20:35 ` Kees Cook
2021-02-03 20:47 ` Steven Rostedt
2021-02-03 21:56 ` Timur Tabi
2021-02-03 22:38 ` Steven Rostedt
2021-02-04 9:36 ` Petr Mladek
2021-02-05 10:59 ` Vlastimil Babka
2021-02-05 18:25 ` Timur Tabi [this message]
2021-02-10 0:24 ` Kees Cook
2021-02-09 21:59 ` Marco Elver
2021-02-09 22:15 ` Timur Tabi
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=d6223371-a5e7-28ac-704c-0e3d5b7ea713@kernel.org \
--to=timur@kernel.org \
--cc=akinobu.mita@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=john.ogness@linutronix.de \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=pmladek@suse.com \
--cc=roman.fietze@magna.com \
--cc=rostedt@goodmis.org \
--cc=sergey.senozhatsky@gmail.com \
--cc=torvalds@linux-foundation.org \
--cc=vbabka@suse.cz \
--cc=willy@infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).