lkml.org 
[lkml]   [2014]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v2 5/5] bug: Make BUG() call unreachable()
Date
On Thursday 27 February 2014 16:16:45 Josh Triplett wrote:
> On Thu, Feb 27, 2014 at 08:19:47PM +0100, Arnd Bergmann wrote:
> > On Wednesday 26 February 2014, Josh Triplett wrote:
> > > This doesn't seem any different than compiling out assert() at runtime
> > > in a userspace program, given how the kernel uses BUG() and BUG_ON().
> > > I'd argue that adding unreachable() doesn't seem like it makes the
> > > current implementation of BUG() any worse; either way if you reach it
> > > you have a problem.
> >
> > I think it's better to get a warning about undefined behavior than
> > to suppress that warning.
>
> Then at this point I'm going to suggest that you go ahead and submit the
> patch you want on top of the first four patches of this series.

Sure, no problem. I'll wait for your patches to show up in linux-next
and then do a patch on top. I'll be traveling for the next week, so
it may get delayed another few days.

> Please keep in mind the value and code size savings of !CONFIG_BUG, versus
> CONFIG_BUG=y and !CONFIG_DEBUG_BUGVERBOSE; those mean two different
> things.

I think I compared all the options before in the patch I cited,
https://lkml.org/lkml/2013/7/5/222 but I agree that the list
is a bit confusing.

> Meanwhile: Andrew, could you go ahead and apply the first four patches?

Yes please.

Arnd


\
 
 \ /
  Last update: 2014-02-28 10:41    [W:0.091 / U:0.736 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site