[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <45348cf615fe40d383c1a25688d4a88f@AcuMS.aculab.com>
Date: Tue, 14 May 2019 08:28:21 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Sergey Senozhatsky' <sergey.senozhatsky.work@...il.com>,
Petr Mladek <pmladek@...e.com>
CC: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
'christophe leroy' <christophe.leroy@....fr>,
Steven Rostedt <rostedt@...dmis.org>,
"Linus Torvalds" <torvalds@...ux-foundation.org>,
Rasmus Villemoes <linux@...musvillemoes.dk>,
"Tobin C . Harding" <me@...in.cc>, Michal Hocko <mhocko@...e.cz>,
Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"Michael Ellerman" <mpe@...erman.id.au>,
"linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
Russell Currey <ruscur@...sell.cc>,
"Stephen Rothwell" <sfr@...abs.org>,
Heiko Carstens <heiko.carstens@...ibm.com>,
"linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>,
"linux-s390@...r.kernel.org" <linux-s390@...r.kernel.org>,
Martin Schwidefsky <schwidefsky@...ibm.com>
Subject: RE: [PATCH] vsprintf: Do not break early boot with probing addresses
> And I like Steven's "(fault)" idea.
> How about this:
>
> if ptr < PAGE_SIZE -> "(null)"
> if IS_ERR_VALUE(ptr) -> "(fault)"
>
> -ss
Or:
if (ptr < PAGE_SIZE)
return ptr ? "(null+)" : "(null)";
if IS_ERR_VALUE(ptr)
return "(errno)"
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
Powered by blists - more mailing lists