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: <20080427210235.GX5882@ZenIV.linux.org.uk>
Date:	Sun, 27 Apr 2008 22:02:35 +0100
From:	Al Viro <viro@...IV.linux.org.uk>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	Harvey Harrison <harvey.harrison@...il.com>,
	Ingo Molnar <mingo@...e.hu>,
	Andrew Morton <akpm@...ux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] bitops: simplify generic bit finding functions

On Sun, Apr 27, 2008 at 01:38:34PM -0700, Linus Torvalds wrote:

> It happens because the warning is done as part of constant expression 
> evaluation, but then the expression isn't actually *used*, so when we 
> optimize it away - at a later date - it's too late to undo the warning.
> 
> I don't rightly know how to fix it. We do want to do the constant 
> evaluation early (since all the optimizations that may then make it a 
> non-issue depends on constants being constants!), but in order to not 
> output the warning we'd have to turn the constant into a "constant with 
> warning 'xyz' if used".
> 
> Which we have no support for in sparse yet.

It's not even a constant, really...  What we need is
	* don't fold further if that sucker would be evaluated (i.e. 0 && <...>
is folded, 0 & <...> is not)
	* don't consider an integer constant expression with value 0 for
purposes of null pointer constant handling
	* emit corresponding insn in linearize_expression() when we run into
such sucker.
	* somewhere around the call of vrfy_flow() walk through insns in
remaining bb (we'd done dead code elimination already) and spew postponed
warning on each such insn.  Probably.  Assuming that I'm not entirely
confused about what's going on in that area - which is quite possible.

Folks, could somebody familiar with the backend comment on the last part?
--
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