lkml.org 
[lkml]   [2018]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3] vsprintf: Prevent crash when dereferencing invalid pointers
From
Date
On Thu, 2018-03-29 at 16:53 +0200, Petr Mladek wrote:
> On Fri 2018-03-16 20:19:35, Andy Shevchenko wrote:
> > On Thu, 2018-03-15 at 16:26 +0100, Petr Mladek wrote:
> > > On Thu 2018-03-15 15:09:03, Andy Shevchenko wrote:

> > > > I still think that printing a hex value of the error code is
> > > > much
> > > > better
> > > > than some odd "(efault)".
> > >
> > > Do you mean (err:0e)? Google gives rather confusing answers for
> > > this.
> >
> > More like "(0xHHHH)" (we have already more than 512 error code
> > numbers.
>
> 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
pointer.

> Also google gives
> rather confusing results when searching, for example for "(0x000E)".

It's not primarily for google, though yeah, people would google for
error messages...

Another question is what the format: decimal versus hex for errors.
Maybe just "(-DDDDD)"?

--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

\
 
 \ /
  Last update: 2018-04-02 16:16    [W:0.127 / U:1.824 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site