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: <46A630EF.5050403@zytor.com>
Date:	Tue, 24 Jul 2007 10:03:43 -0700
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Jeremy Fitzhardinge <jeremy@...p.org>
CC:	Al Viro <viro@....linux.org.uk>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org
Subject: Re: [PATCH][RFC] getting rid of stupid loop in BUG()

Jeremy Fitzhardinge wrote:
> Al Viro wrote:
>> 	AFAICS, the patch below should do it for i386; instead of
>> using a dummy loop to tell gcc that this sucker never returns,
>> we do
>> static void __always_inline __noreturn __BUG(const char *file, int line);
>> containing the actual asm we want to insert and define BUG() as
>> __BUG(__FILE__, __LINE__).  It looks safe, but I don't claim enough
>> experience with gcc __asm__ potential nastiness, so...
>>
>> Comments, objections?
>>   
> 
> Does it work?  When I wrote the BUG code I tried this, but gcc kept
> warning about "noreturn function returns".  I couldn't work out a way to
> convince gcc that the asm is the end of the line.
> 
> I'm actually in favour of dropping the loop and the noreturn stuff
> altogether.  It means that gcc thinks everything is live at the time of
> the BUG, and the debugging info at the point of the ud2a is more useful.

How much code would that add to the kernel?

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