linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Petr Mladek <pmladek@suse.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
	Adam Borowski <kilobyte@angband.pl>,
	Kees Cook <keescook@chromium.org>,
	"Tobin C. Harding" <me@tobin.cc>,
	Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	LKML <linux-kernel@vger.kernel.org>,
	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>
Subject: Re: [PATCH] vsprintf: avoid misleading "(null)" for %px
Date: Wed, 14 Feb 2018 16:35:35 +0200	[thread overview]
Message-ID: <CAHp75Ve5GN25xtMe3Umgd3gEQ-FEwPL2i8FmsPuLLn77+=Qm6g@mail.gmail.com> (raw)
In-Reply-To: <20180209120313.rckq3s54nr6yyus4@pathway.suse.cz>

On Fri, Feb 9, 2018 at 2:03 PM, Petr Mladek <pmladek@suse.com> wrote:
> On Thu 2018-02-08 17:29:14, Andy Shevchenko wrote:
>> On Wed, Feb 7, 2018 at 5:41 PM, Petr Mladek <pmladek@suse.com> wrote:
>> > On Wed 2018-02-07 16:11:13, Geert Uytterhoeven wrote:
>>
>> > To make it clear. I was talking about "%p" format that is handled
>> > in the pointer() function in lib/vsprintf.c. The "(null)" makes
>> > sense only for the many modifiers that do deference of
>> > the pointer, e.g. "%pa", "%pE", "%ph".
>>
>> JFYI: I have a patch to eliminate those for %pE & %ph.
>>
>> Google for "lib/vsprintf: Remove useless NULL checks" as a first in
>> the series for new extension to print times.
>
> I am slightly confused. IMHO, it makes sense to printk "(null)"
> for %pE and %ph.

Yes, but isn't it done by if (!ptr) check in the very beginning of the
pointer() helper?

> Or do you just want to avoid the duplicit check in hex_string()
> and escaped_string()?

And that is as well.

> Well, it might be better to discuss this once you send the patch.

I can Cc you, though the patch is pretty independent on the series. I
can send it separately.

-- 
With Best Regards,
Andy Shevchenko

      reply	other threads:[~2018-02-14 14:35 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
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 [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='CAHp75Ve5GN25xtMe3Umgd3gEQ-FEwPL2i8FmsPuLLn77+=Qm6g@mail.gmail.com' \
    --to=andy.shevchenko@gmail.com \
    --cc=David.Laight@aculab.com \
    --cc=akpm@linux-foundation.org \
    --cc=geert@linux-m68k.org \
    --cc=joe@perches.com \
    --cc=keescook@chromium.org \
    --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).