Re: [PATCH] vsprintf: avoid misleading "(null)" for %px

2018-02-14 Thread Andy Shevchenko
On Fri, Feb 9, 2018 at 2:03 PM, Petr Mladek wrote: > On Thu 2018-02-08 17:29:14, Andy Shevchenko wrote: >> On Wed, Feb 7, 2018 at 5:41 PM, Petr Mladek wrote: >> > On Wed 2018-02-07 16:11:13, Geert Uytterhoeven wrote: >> >> > To make it clear. I was talking

Re: [PATCH] vsprintf: avoid misleading "(null)" for %px

2018-02-14 Thread Andy Shevchenko
On Fri, Feb 9, 2018 at 2:03 PM, Petr Mladek wrote: > On Thu 2018-02-08 17:29:14, Andy Shevchenko wrote: >> On Wed, Feb 7, 2018 at 5:41 PM, Petr Mladek 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 >> >

Re: [PATCH] vsprintf: avoid misleading "(null)" for %px

2018-02-09 Thread Petr Mladek
On Thu 2018-02-08 17:29:14, Andy Shevchenko wrote: > On Wed, Feb 7, 2018 at 5:41 PM, Petr Mladek 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

Re: [PATCH] vsprintf: avoid misleading "(null)" for %px

2018-02-09 Thread Petr Mladek
On Thu 2018-02-08 17:29:14, Andy Shevchenko wrote: > On Wed, Feb 7, 2018 at 5:41 PM, Petr Mladek 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)"

Re: [PATCH] vsprintf: avoid misleading "(null)" for %px

2018-02-08 Thread Andy Shevchenko
On Wed, Feb 7, 2018 at 5:41 PM, Petr Mladek 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

Re: [PATCH] vsprintf: avoid misleading "(null)" for %px

2018-02-08 Thread Andy Shevchenko
On Wed, Feb 7, 2018 at 5:41 PM, Petr Mladek 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

Re: [PATCH] vsprintf: avoid misleading "(null)" for %px

2018-02-07 Thread Geert Uytterhoeven
Hi Petr, On Wed, Feb 7, 2018 at 4:41 PM, Petr Mladek wrote: > On Wed 2018-02-07 16:11:13, Geert Uytterhoeven wrote: >> On Wed, Feb 7, 2018 at 4:03 PM, Petr Mladek wrote: >> > [*] I made some archaeology: >> > >> > The "(null)" string was added by the commit

Re: [PATCH] vsprintf: avoid misleading "(null)" for %px

2018-02-07 Thread Geert Uytterhoeven
Hi Petr, On Wed, Feb 7, 2018 at 4:41 PM, Petr Mladek wrote: > On Wed 2018-02-07 16:11:13, Geert Uytterhoeven wrote: >> On Wed, Feb 7, 2018 at 4:03 PM, Petr Mladek wrote: >> > [*] I made some archaeology: >> > >> > The "(null)" string was added by the commit d97106ab53f812910 >> > ("Make %p

Re: [PATCH] vsprintf: avoid misleading "(null)" for %px

2018-02-07 Thread Petr Mladek
On Wed 2018-02-07 16:11:13, Geert Uytterhoeven wrote: > Hi Petr, > > On Wed, Feb 7, 2018 at 4:03 PM, Petr Mladek wrote: > > [*] I made some archaeology: > > > > The "(null)" string was added by the commit d97106ab53f812910 > > ("Make %p print '(null)' for NULL pointers"). > > >

Re: [PATCH] vsprintf: avoid misleading "(null)" for %px

2018-02-07 Thread Petr Mladek
On Wed 2018-02-07 16:11:13, Geert Uytterhoeven wrote: > Hi Petr, > > On Wed, Feb 7, 2018 at 4:03 PM, Petr Mladek wrote: > > [*] I made some archaeology: > > > > The "(null)" string was added by the commit d97106ab53f812910 > > ("Make %p print '(null)' for NULL pointers"). > > > > It was a

Re: [PATCH] vsprintf: avoid misleading "(null)" for %px

2018-02-07 Thread Geert Uytterhoeven
Hi Petr, On Wed, Feb 7, 2018 at 4:03 PM, Petr Mladek wrote: > On Mon 2018-02-05 21:58:17, Adam Borowski wrote: >> On Tue, Feb 06, 2018 at 07:32:32AM +1100, Kees Cook wrote: >> > On Tue, Feb 6, 2018 at 7:15 AM, Tobin C. Harding wrote: >> > > On Tue, Feb 06, 2018

Re: [PATCH] vsprintf: avoid misleading "(null)" for %px

2018-02-07 Thread Geert Uytterhoeven
Hi Petr, On Wed, Feb 7, 2018 at 4:03 PM, Petr Mladek wrote: > On Mon 2018-02-05 21:58:17, Adam Borowski wrote: >> On Tue, Feb 06, 2018 at 07:32:32AM +1100, Kees Cook wrote: >> > On Tue, Feb 6, 2018 at 7:15 AM, Tobin C. Harding wrote: >> > > On Tue, Feb 06, 2018 at 05:57:17AM +1100, Kees Cook

Re: [PATCH] vsprintf: avoid misleading "(null)" for %px

2018-02-07 Thread Petr Mladek
On Mon 2018-02-05 21:58:17, Adam Borowski wrote: > On Tue, Feb 06, 2018 at 07:32:32AM +1100, Kees Cook wrote: > > On Tue, Feb 6, 2018 at 7:15 AM, Tobin C. Harding wrote: > > > On Tue, Feb 06, 2018 at 05:57:17AM +1100, Kees Cook wrote: > > >> On Mon, Feb 5, 2018 at 8:44 PM, Petr

Re: [PATCH] vsprintf: avoid misleading "(null)" for %px

2018-02-07 Thread Petr Mladek
On Mon 2018-02-05 21:58:17, Adam Borowski wrote: > On Tue, Feb 06, 2018 at 07:32:32AM +1100, Kees Cook wrote: > > On Tue, Feb 6, 2018 at 7:15 AM, Tobin C. Harding wrote: > > > On Tue, Feb 06, 2018 at 05:57:17AM +1100, Kees Cook wrote: > > >> On Mon, Feb 5, 2018 at 8:44 PM, Petr Mladek wrote: > >

Re: [PATCH] vsprintf: avoid misleading "(null)" for %px

2018-02-06 Thread Andy Shevchenko
On Tue, Feb 6, 2018 at 12:22 AM, Tobin C. Harding wrote: > The original patch is good IMO and I AFAICT in everyone else's. The original patch misses test cases. Without them is problematic to follow what's going on with printing. -- With Best Regards, Andy Shevchenko

Re: [PATCH] vsprintf: avoid misleading "(null)" for %px

2018-02-06 Thread Andy Shevchenko
On Tue, Feb 6, 2018 at 12:22 AM, Tobin C. Harding wrote: > The original patch is good IMO and I AFAICT in everyone else's. The original patch misses test cases. Without them is problematic to follow what's going on with printing. -- With Best Regards, Andy Shevchenko

RE: [PATCH] vsprintf: avoid misleading "(null)" for %px

2018-02-06 Thread Roberts, William C
valds@linux- > foundation.org>; David Laight <david.lai...@aculab.com>; Randy Dunlap > <rdun...@infradead.org>; Geert Uytterhoeven <ge...@linux-m68k.org> > Subject: Re: [PATCH] vsprintf: avoid misleading "(null)" for %px > > On Mon, Feb 05, 2018 at 09:58

RE: [PATCH] vsprintf: avoid misleading "(null)" for %px

2018-02-06 Thread Roberts, William C
William C ; Linus Torvalds foundation.org>; David Laight ; Randy Dunlap > ; Geert Uytterhoeven > Subject: Re: [PATCH] vsprintf: avoid misleading "(null)" for %px > > On Mon, Feb 05, 2018 at 09:58:17PM +0100, Adam Borowski wrote: > > On Tue, Feb 06, 2018 at 07:32:32AM +1

Re: [PATCH] vsprintf: avoid misleading "(null)" for %px

2018-02-05 Thread Tobin C. Harding
On Mon, Feb 05, 2018 at 09:58:17PM +0100, Adam Borowski wrote: > On Tue, Feb 06, 2018 at 07:32:32AM +1100, Kees Cook wrote: > > On Tue, Feb 6, 2018 at 7:15 AM, Tobin C. Harding wrote: > > > On Tue, Feb 06, 2018 at 05:57:17AM +1100, Kees Cook wrote: > > >> On Mon, Feb 5, 2018 at

Re: [PATCH] vsprintf: avoid misleading "(null)" for %px

2018-02-05 Thread Tobin C. Harding
On Mon, Feb 05, 2018 at 09:58:17PM +0100, Adam Borowski wrote: > On Tue, Feb 06, 2018 at 07:32:32AM +1100, Kees Cook wrote: > > On Tue, Feb 6, 2018 at 7:15 AM, Tobin C. Harding wrote: > > > On Tue, Feb 06, 2018 at 05:57:17AM +1100, Kees Cook wrote: > > >> On Mon, Feb 5, 2018 at 8:44 PM, Petr

Re: [PATCH] vsprintf: avoid misleading "(null)" for %px

2018-02-05 Thread Adam Borowski
On Tue, Feb 06, 2018 at 07:32:32AM +1100, Kees Cook wrote: > On Tue, Feb 6, 2018 at 7:15 AM, Tobin C. Harding wrote: > > On Tue, Feb 06, 2018 at 05:57:17AM +1100, Kees Cook wrote: > >> On Mon, Feb 5, 2018 at 8:44 PM, Petr Mladek wrote: > >> > On Sun 2018-02-04

Re: [PATCH] vsprintf: avoid misleading "(null)" for %px

2018-02-05 Thread Adam Borowski
On Tue, Feb 06, 2018 at 07:32:32AM +1100, Kees Cook wrote: > On Tue, Feb 6, 2018 at 7:15 AM, Tobin C. Harding wrote: > > On Tue, Feb 06, 2018 at 05:57:17AM +1100, Kees Cook wrote: > >> On Mon, Feb 5, 2018 at 8:44 PM, Petr Mladek wrote: > >> > On Sun 2018-02-04 18:45:21, Adam Borowski wrote: > >>

Re: [PATCH] vsprintf: avoid misleading "(null)" for %px

2018-02-05 Thread Kees Cook
On Tue, Feb 6, 2018 at 7:15 AM, Tobin C. Harding wrote: > On Tue, Feb 06, 2018 at 05:57:17AM +1100, Kees Cook wrote: >> On Mon, Feb 5, 2018 at 8:44 PM, Petr Mladek wrote: >> > Hi, >> > >> > I add people who actively commented on adding %px modifier, >> > see the

Re: [PATCH] vsprintf: avoid misleading "(null)" for %px

2018-02-05 Thread Kees Cook
On Tue, Feb 6, 2018 at 7:15 AM, Tobin C. Harding wrote: > On Tue, Feb 06, 2018 at 05:57:17AM +1100, Kees Cook wrote: >> On Mon, Feb 5, 2018 at 8:44 PM, Petr Mladek wrote: >> > Hi, >> > >> > I add people who actively commented on adding %px modifier, >> > see the thread starting at >> >

Re: [PATCH] vsprintf: avoid misleading "(null)" for %px

2018-02-05 Thread Tobin C. Harding
On Mon, Feb 05, 2018 at 09:36:03AM -0800, Randy Dunlap wrote: > On 02/05/2018 08:49 AM, Steven Rostedt wrote: > > On Mon, 5 Feb 2018 16:22:19 +0100 > > Adam Borowski wrote: > > > >> My change touches %px only, where your concern doesn't apply. > >> > >> You're right, though,

Re: [PATCH] vsprintf: avoid misleading "(null)" for %px

2018-02-05 Thread Tobin C. Harding
On Mon, Feb 05, 2018 at 09:36:03AM -0800, Randy Dunlap wrote: > On 02/05/2018 08:49 AM, Steven Rostedt wrote: > > On Mon, 5 Feb 2018 16:22:19 +0100 > > Adam Borowski wrote: > > > >> My change touches %px only, where your concern doesn't apply. > >> > >> You're right, though, when it comes to

Re: [PATCH] vsprintf: avoid misleading "(null)" for %px

2018-02-05 Thread Tobin C. Harding
On Tue, Feb 06, 2018 at 05:57:17AM +1100, Kees Cook wrote: > On Mon, Feb 5, 2018 at 8:44 PM, Petr Mladek wrote: > > Hi, > > > > I add people who actively commented on adding %px modifier, > > see the thread starting at > >

Re: [PATCH] vsprintf: avoid misleading "(null)" for %px

2018-02-05 Thread Tobin C. Harding
On Tue, Feb 06, 2018 at 05:57:17AM +1100, Kees Cook wrote: > On Mon, Feb 5, 2018 at 8:44 PM, Petr Mladek 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...@tobin.cc > >

Re: [PATCH] vsprintf: avoid misleading "(null)" for %px

2018-02-05 Thread Kees Cook
On Mon, Feb 5, 2018 at 8:44 PM, Petr Mladek 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...@tobin.cc > > Just for reference. It seems to be related to the

Re: [PATCH] vsprintf: avoid misleading "(null)" for %px

2018-02-05 Thread Kees Cook
On Mon, Feb 5, 2018 at 8:44 PM, Petr Mladek 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...@tobin.cc > > Just for reference. It seems to be related to the commit

Re: [PATCH] vsprintf: avoid misleading "(null)" for %px

2018-02-05 Thread Randy Dunlap
On 02/05/2018 08:49 AM, Steven Rostedt wrote: > On Mon, 5 Feb 2018 16:22:19 +0100 > Adam Borowski wrote: > >> My change touches %px only, where your concern doesn't apply. >> >> You're right, though, when it comes to %pK: >> printk("%%pK: %pK, %%px: %px\n", 0, 0); >>

Re: [PATCH] vsprintf: avoid misleading "(null)" for %px

2018-02-05 Thread Randy Dunlap
On 02/05/2018 08:49 AM, Steven Rostedt wrote: > On Mon, 5 Feb 2018 16:22:19 +0100 > Adam Borowski wrote: > >> My change touches %px only, where your concern doesn't apply. >> >> You're right, though, when it comes to %pK: >> printk("%%pK: %pK, %%px: %px\n", 0, 0); >> says >> %pK:

Re: [PATCH] vsprintf: avoid misleading "(null)" for %px

2018-02-05 Thread Steven Rostedt
On Mon, 5 Feb 2018 16:22:19 +0100 Adam Borowski wrote: > My change touches %px only, where your concern doesn't apply. > > You're right, though, when it comes to %pK: > printk("%%pK: %pK, %%px: %px\n", 0, 0); > says > %pK: ba8bdc0a, %px: >

Re: [PATCH] vsprintf: avoid misleading "(null)" for %px

2018-02-05 Thread Steven Rostedt
On Mon, 5 Feb 2018 16:22:19 +0100 Adam Borowski wrote: > My change touches %px only, where your concern doesn't apply. > > You're right, though, when it comes to %pK: > printk("%%pK: %pK, %%px: %px\n", 0, 0); > says > %pK: ba8bdc0a, %px: > > So what should we

Re: [PATCH] vsprintf: avoid misleading "(null)" for %px

2018-02-05 Thread Adam Borowski
On Mon, Feb 05, 2018 at 09:03:05PM +1100, Tobin C. Harding wrote: > On Mon, Feb 05, 2018 at 10:44:38AM +0100, Petr Mladek wrote: > > On Sun 2018-02-04 18:45:21, Adam Borowski wrote: > > > Like %pK already does, print "" instead. > > > > > > This confused people -- the convention is that

Re: [PATCH] vsprintf: avoid misleading "(null)" for %px

2018-02-05 Thread Adam Borowski
On Mon, Feb 05, 2018 at 09:03:05PM +1100, Tobin C. Harding wrote: > On Mon, Feb 05, 2018 at 10:44:38AM +0100, Petr Mladek wrote: > > On Sun 2018-02-04 18:45:21, Adam Borowski wrote: > > > Like %pK already does, print "" instead. > > > > > > This confused people -- the convention is that

Re: [PATCH] vsprintf: avoid misleading "(null)" for %px

2018-02-05 Thread Tobin C. Harding
On Mon, Feb 05, 2018 at 10:44:38AM +0100, Petr Mladek 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...@tobin.cc > > Just for reference. It seems to be related to the commit

Re: [PATCH] vsprintf: avoid misleading "(null)" for %px

2018-02-05 Thread Tobin C. Harding
On Mon, Feb 05, 2018 at 10:44:38AM +0100, Petr Mladek 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...@tobin.cc > > Just for reference. It seems to be related to the commit

Re: [PATCH] vsprintf: avoid misleading "(null)" for %px

2018-02-05 Thread Petr Mladek
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...@tobin.cc Just for reference. It seems to be related to the commit 9f36e2c448007b54 ("printk: use %pK for /proc/kallsyms and /proc/modules").

Re: [PATCH] vsprintf: avoid misleading "(null)" for %px

2018-02-05 Thread Petr Mladek
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...@tobin.cc Just for reference. It seems to be related to the commit 9f36e2c448007b54 ("printk: use %pK for /proc/kallsyms and /proc/modules").

[PATCH] vsprintf: avoid misleading "(null)" for %px

2018-02-04 Thread Adam Borowski
Like %pK already does, print "" instead. This confused people -- the convention is that "(null)" means you tried to dereference a null pointer as opposed to printing the address. Signed-off-by: Adam Borowski --- lib/vsprintf.c | 2 +- 1 file changed, 1

[PATCH] vsprintf: avoid misleading "(null)" for %px

2018-02-04 Thread Adam Borowski
Like %pK already does, print "" instead. This confused people -- the convention is that "(null)" means you tried to dereference a null pointer as opposed to printing the address. Signed-off-by: Adam Borowski --- lib/vsprintf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff