lkml.org 
[lkml]   [2022]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] vsprintf: protect kernel from panic due to non-canonical pointer dereference
On Wed, Oct 19, 2022 at 10:43:07AM +0000, Haakon Bugge wrote:
> > On 18 Oct 2022, at 22:49, Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:
> > On Tue, Oct 18, 2022 at 08:30:01PM +0000, Jane Chu wrote:

...

> > Obviously, to see the crash. And let kernel _to crash_. Isn't it what we need
> > to see a bug as early as possible?
>
> If you follow that argument, why doesn't the kernel crash when the pointer
> is, e.g., a NULL pointer? According to you, shouldn't it crash a early as
> possible in that case also?

Because it is _special_. It's not just an invalid pointer. There may be
very well good cases where we supply (valid!) NULL pointers to the printf().

--
With Best Regards,
Andy Shevchenko


\
 
 \ /
  Last update: 2022-10-19 13:49    [W:0.214 / U:0.864 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site