[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1520429370.10722.467.camel@linux.intel.com>
Date: Wed, 07 Mar 2018 15:29:30 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Adam Borowski <kilobyte@...band.pl>,
Petr Mladek <pmladek@...e.com>,
Rasmus Villemoes <linux@...musvillemoes.dk>,
"Tobin C . Harding" <me@...in.cc>, Joe Perches <joe@...ches.com>,
linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
Michal Hocko <mhocko@...e.cz>
Subject: Re: [PATCH 1/2] vsprintf: distinguish between (null), (err) and
(invalid) pointer derefs
On Tue, 2018-03-06 at 19:11 +0100, Adam Borowski wrote:
> Attempting to print an object pointed to by a bad (usually ERR_PTR)
> pointer
> is a not so surprising error. Our code handles them inconsistently:
> * two places print (null) if ptr<PAGE_SIZE
> * one place prints (null) if abs(ptr)<PAGE_SIZE
> * one place prints (null) only if !ptr
>
> Obviously, saying (null) for a small but non-0 value is misleading.
> Thus, let's print:
> * (null) for exactly 0
> * (err) if last page && abs(ptr)<=MAX_ERRNO
> * (invalid) otherwise
Ah, and last but not least thing.
Where are the test cases?
--
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Intel Finland Oy
Powered by blists - more mailing lists