lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <458AD71D.2060508@goop.org>
Date:	Thu, 21 Dec 2006 10:49:01 -0800
From:	Jeremy Fitzhardinge <jeremy@...p.org>
To:	Ingo Molnar <mingo@...e.hu>
CC:	Linus Torvalds <torvalds@...l.org>, Andrew Morton <akpm@...l.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [patch] change WARN_ON back to "BUG: at ..."

Ingo Molnar wrote:
> Subject: [patch] change WARN_ON back to "BUG: at ..."
> From: Ingo Molnar <mingo@...e.hu>
>
> WARN_ON() ever triggering is a kernel bug. Do not try to paper over this 
> fact by suggesting to the user that this is 'only' a warning, as the 
> following recent commit does:
>   
I disagree.

I think there are two issues here: intent and effect.

What's the intent of WARN_ON?  Presumably its different from BUG_ON,
otherwise you could just use BUG_ON.  Or if not, why not just have
BUG_ON?  I think in practice many WARN_ONs are clearly not intended to
be as serious as BUG_ON: they warn about unimplemented things, transient
hiccups, clarifications of errno returns, etc.  (Whether WARN_ON is a
good mechanism for all these things is a separate issue.)

Their effects are very different too.  The effect of WARN_ON is simply a
message; if I see it in a log, I know that something happened which
should be fixed, but the system is in a fairly sane state.  If I see a
BUG_ON, then I know something was killed with extreme prejudice - at
best a process got killed, but there may be stray locks held or other
damage - and the system is basically teetering if it hasn't crashed
already.  Because the effects of the two warning mechanisms are so
different, I think its important to make them clearly visually distinct
when scanning the kernel output.  My eye is trained to see "BUG: " as
meaning "something destabilizing happened"; if warnings also appear that
way, then it is just needlessly confusing.

    J
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ