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] [day] [month] [year] [list]
Date:	Tue, 06 Mar 2007 10:47:29 -0800 (PST)
From:	David Miller <davem@...emloft.net>
To:	heiko.carstens@...ibm.com
Cc:	schwidefsky@...ibm.com, linux-kernel@...r.kernel.org,
	linux-s390@...r.kernel.org
Subject: Re: [S390] Use generic bug.

From: Heiko Carstens <heiko.carstens@...ibm.com>
Date: Tue, 6 Mar 2007 12:59:17 +0100

> On Mon, Mar 05, 2007 at 02:56:29PM -0800, David Miller wrote:
> > From: Martin Schwidefsky <schwidefsky@...ibm.com>
> > Date: Mon, 5 Mar 2007 23:43:54 +0100
> > 
> > > +	if (__builtin_constant_p(__ret_warn_on)) {	\
> > > +		if (__ret_warn_on)			\
> > > +			__EMIT_BUG(BUGFLAG_WARNING);	\
> > 
> > I see we'll have this construct on powerpc, parisc and now s390.
> > 
> > But if it's going to trigger essentially at compile time, I
> > think it's much better to BUILD_BUG_ON() in this case instead
> > of counting on the code path to actually run and the user to
> > notice and report the kernel log message.
> 
> So something like WARN_ON(1) won't compile, but BUG_ON(1) still
> would? Seems odd to me.
> Also since there is nothing like WARN(), you have to use WARN_ON(1).
> Btw.: sparc64 has plenty of these ;)

I see.  It's for case where we can't put the test into the
WARN_ON() call.

Thanks for the explanation, I hadn't considered such cases.
-
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