From: Kees Cook <keescook@chromium.org>
To: Petr Mladek <pmladek@suse.com>
Cc: Adam Borowski <kilobyte@angband.pl>,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
Steven Rostedt <rostedt@goodmis.org>,
LKML <linux-kernel@vger.kernel.org>,
"Tobin C. Harding" <me@tobin.cc>,
Andrew Morton <akpm@linux-foundation.org>,
Joe Perches <joe@perches.com>,
"Roberts, William C" <william.c.roberts@intel.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
David Laight <David.Laight@aculab.com>,
Randy Dunlap <rdunlap@infradead.org>,
Geert Uytterhoeven <geert@linux-m68k.org>
Subject: Re: [PATCH] vsprintf: avoid misleading "(null)" for %px
Date: Tue, 6 Feb 2018 05:57:17 +1100 [thread overview]
Message-ID: <CAGXu5j+rWhT7_DH5Z96_7naPou96-6736x4mjq0r_8EG4iiQ_g@mail.gmail.com> (raw)
In-Reply-To: <20180205094438.pfd7ffymlvklpxe7@pathway.suse.cz>
On Mon, Feb 5, 2018 at 8:44 PM, Petr Mladek <pmladek@suse.com> wrote:
> Hi,
>
> I add people who actively commented on adding %px modifier,
> see the thread starting at
> https://lkml.kernel.org/r/1511921105-3647-5-git-send-email-me@tobin.cc
>
> Just for reference. It seems to be related to the commit 9f36e2c448007b54
> ("printk: use %pK for /proc/kallsyms and /proc/modules").
>
>
> On Sun 2018-02-04 18:45:21, Adam Borowski wrote:
>> Like %pK already does, print "00000000" instead.
>>
>> This confused people -- the convention is that "(null)" means you tried to
>> dereference a null pointer as opposed to printing the address.
>
> By other words, this avoids regressions when people convert
> %x to %px. Do I get it right, please?
Nothing should be converting from %x to %px, it's %p to %px. %p print
"(null)" for 0x0, so it would be surprising for a conversion from %p
to %px to change that. (Though generally speaking "(null)" is never
useful...)
-Kees
--
Kees Cook
Pixel Security
next prev parent reply other threads:[~2018-02-05 18:57 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-04 17:45 [PATCH] vsprintf: avoid misleading "(null)" for %px Adam Borowski
2018-02-05 9:44 ` Petr Mladek
2018-02-05 10:03 ` Tobin C. Harding
2018-02-05 15:22 ` Adam Borowski
2018-02-05 16:49 ` Steven Rostedt
2018-02-05 17:36 ` Randy Dunlap
2018-02-05 20:19 ` Tobin C. Harding
2018-02-05 18:57 ` Kees Cook [this message]
2018-02-05 20:15 ` Tobin C. Harding
2018-02-05 20:32 ` Kees Cook
2018-02-05 20:58 ` Adam Borowski
2018-02-05 22:22 ` Tobin C. Harding
2018-02-06 18:43 ` Andy Shevchenko
2018-02-07 15:03 ` Petr Mladek
2018-02-07 15:11 ` Geert Uytterhoeven
2018-02-07 15:41 ` Petr Mladek
2018-02-07 15:48 ` Geert Uytterhoeven
2018-02-08 15:29 ` Andy Shevchenko
2018-02-09 12:03 ` Petr Mladek
2018-02-14 14:35 ` Andy Shevchenko
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=CAGXu5j+rWhT7_DH5Z96_7naPou96-6736x4mjq0r_8EG4iiQ_g@mail.gmail.com \
--to=keescook@chromium.org \
--cc=David.Laight@aculab.com \
--cc=akpm@linux-foundation.org \
--cc=geert@linux-m68k.org \
--cc=joe@perches.com \
--cc=kilobyte@angband.pl \
--cc=linux-kernel@vger.kernel.org \
--cc=me@tobin.cc \
--cc=pmladek@suse.com \
--cc=rdunlap@infradead.org \
--cc=rostedt@goodmis.org \
--cc=sergey.senozhatsky@gmail.com \
--cc=torvalds@linux-foundation.org \
--cc=william.c.roberts@intel.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;
as well as URLs for NNTP newsgroup(s).