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]
Date:	Thu, 19 Feb 2009 12:47:01 -0800
From:	Jeremy Fitzhardinge <jeremy@...p.org>
To:	"H. Peter Anvin" <hpa@...or.com>
CC:	Ingo Molnar <mingo@...e.hu>, Petr Tesarik <ptesarik@...e.cz>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x86: remove unneeded endless loop in BUG()

H. Peter Anvin wrote:
> For that to happen, it would have to move the asm volatile relative to 
> the __builtin_trap(), which seems slightly unlikely -- are there any 
> cases at which this has been known to happen, or is that conjecture on 
> your part?

There's no reason to expect an "asm volatile" to stay put; the 
"volatile" has nothing to do with preventing code motion.  The only way 
to make an asm stick in one place is with data dependencies, and I'm not 
sure what the dependency for __builtin_trap might be.  I'm guessing its 
a "memory" clobber, but that's pure guesswork.

> It would be more of a "right thing" to do this with a label on the 
> __builtin_trap(), but the problem with that labels have function scope 
> even if they occur inside a block.

No, you can declare them local (__label__ foo).  But gcc will happily do 
crazy/crappy things with them if you don't actually end up gotoing them 
(even indirectly).  I've had a couple of go-rounds with the fine helpful 
gcc folks on this very issue...

It would be worth checking the archives from about the time I did the 
generic BUG stuff; around dec-jan 2006-7, I think.

    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