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: <1215540006.5553.187.camel@localhost>
Date:	Tue, 08 Jul 2008 11:00:05 -0700
From:	Joe Perches <joe@...ches.com>
To:	Arjan van de Ven <arjan@...radead.org>
Cc:	linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
	mingo@...e.hu
Subject: Re: [patch 2/17] Add a WARN() macro that acts like WARN_ON()+printk

On Tue, 2008-07-08 at 09:40 -0700, Arjan van de Ven wrote:
> +#ifndef WARN
> +#define WARN(condition, format...) ({					\
> +	int __ret_warn_on = !!(condition);				\
> +	if (unlikely(__ret_warn_on))					\
> +		__WARN_printf(format);					\
> +	unlikely(__ret_warn_on);					\
> +})
> +#endif
> +

If all current uses of WARN are going to change, perhaps
adding an argument for KERN_<level> or removing the
KERN_<level> prefixes and standardizing on a single
KERN_<level> (KERN_WARNING?) is appropriate.

If not standardizing on a single KERN_<level> prefix,
perhaps change the conditional and using something like:

	assert_<level>(cond, fmt, arg...)
or
	assert_msg(cond, level, fmt, arg...)


--
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