[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1522756585.21176.316.camel@linux.intel.com>
Date: Tue, 03 Apr 2018 14:56:25 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Petr Mladek <pmladek@...e.com>,
Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Rasmus Villemoes <linux@...musvillemoes.dk>,
"Tobin C . Harding" <me@...in.cc>, Joe Perches <joe@...ches.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Michal Hocko <mhocko@...e.cz>,
Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
Steven Rostedt <rostedt@...dmis.org>
Subject: Re: [PATCH v3] vsprintf: Prevent crash when dereferencing invalid
pointers
On Tue, 2018-04-03 at 13:52 +0200, Petr Mladek wrote:
> On Tue 2018-04-03 10:12:37, Sergey Senozhatsky wrote:
> > On (04/02/18 17:15), Andy Shevchenko wrote:
> > > >
> > > > Hmm, I have never seen the error code in this form.
> > >
> > > We have limited space to print it and error numbers currently can
> > > be up
> > > to 0xfff (4095). So, I have no better idea how to squeeze them
> > > while
> > > thinking that "(efault)" is much harder to parse in case of error
> >
> > 'efault' looks to me like a misspelled 'default', for some reason.
>
> I wonder if (-efault) would help a bit.
It's 9 characters, not going to satisfy sizeof(void *) * 2 on 32-bit
systems.
> Even better might be (-EFAULT). But then it would be better to use
> (NULL). It already was but it was explicitly changed to the lowercase
> variant by the commit 0f4f81dce93774a447da3c ("vsprintf: factorize
> "(null)" string").
--
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Intel Finland Oy
Powered by blists - more mailing lists