lkml.org 
[lkml]   [2013]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 4/4] x86/jump-label: Show where and what was wrong on errors
From
Date
On Wed, 2013-08-07 at 19:20 +0200, Borislav Petkov wrote:
>
> > +static void bug_at(unsigned char *ip, int line)
> > +{
> > + /*
> > + * The location is not an op that we were expecting.
> > + * Something went wrong. Crash the box, as something could be
> > + * corrupting the kernel.
> > + */
> > + pr_warning("Unexpected op at %pS [%p] (%02x %02x %02x %02x %02x) %s:%d\n",
> > + ip, ip, ip[0], ip[1], ip[2], ip[3], ip[4], __FILE__, line);
> > + BUG();
>
> Why not simply
>
> panic("Unexpected...")
>
> ?

Because the patch replaced BUG().

>
> Besides, BUG can be disabled in CONFIG_EXPERT.
>

Right, and this code keeps the same logic as it was before. If it was
disabled by CONFIG_EXPERT, it stays disabled, but at least you get to
see a warning that your kernel may be corrupt now :-)

-- Steve




\
 
 \ /
  Last update: 2013-08-07 20:01    [W:0.092 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site