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: <20080711165634.3a1c197e@infradead.org>
Date:	Fri, 11 Jul 2008 16:56:34 -0700
From:	Arjan van de Ven <arjan@...radead.org>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	linux-kernel@...r.kernel.org, mingo@...e.hu
Subject: Re: [patch 13/17] Use WARN() in drivers/base/

On Fri, 11 Jul 2008 16:02:13 -0700
Andrew Morton <akpm@...ux-foundation.org> wrote:

> On Fri, 11 Jul 2008 15:51:05 -0700 Arjan van de Ven
> <arjan@...radead.org> wrote:
> 
> > On Fri, 11 Jul 2008 15:11:10 -0700
> > Andrew Morton <akpm@...ux-foundation.org> wrote:
> > 
> > > 
> > > I don't suppose there's any way of tricking the preprocessor into
> > > supporting
> > > 
> > > 	WARN_ON(foo == 42);
> > > 
> > > as well as
> > > 
> > > 	WARN_ON(foo == 42, "bite me!");
> > > 
> > 
> > after reading preprocessor docs from gcc and trying some things:
> > We can do this. It comes at a price: the price is a blank line in
> > the WARN trace for the "no printk comments" case, and we lose the
> > ability to override the printk level. (which you can argue is a
> > feature by just setting it to KERN_WARNING).
> > 
> > (and some interesting but otherwise non-harmful preprocessor stuff
> > in headers)
> 
> the blank line: might be avoidable by doing some extra work at runtime
> to recognise its presence?

probably (but vararg stuff is weird)

> 
> overriding facility level: doesn't sound very useful, as WARN()'s
> stack-trace's facility level is not controllable.

ok

> 
> > Is this is price worth paying to not have a second macro?
> 
> Dunno, how ugly is the patch?

it's not too bad ;) I'll turn the userland experiment into a kernel
patch tomorrow or so

> 
> It would be rather nice to not go and fatten the interface.  Would
> there be additional text or data size costs?

there will be a few bytes of text in the out of line implementation;
I'm not too worried about that.
There shouldn't be a per-instance overhead

-- 
If you want to reach me at my work email, use arjan@...ux.intel.com
For development, discussion and tips for power savings, 
visit http://www.lesswatts.org
--
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