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: <46A66BD1.9020802@goop.org>
Date:	Tue, 24 Jul 2007 14:14:57 -0700
From:	Jeremy Fitzhardinge <jeremy@...p.org>
To:	Al Viro <viro@....linux.org.uk>
CC:	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()

Al Viro wrote:
> On Tue, Jul 24, 2007 at 12:13:19PM -0700, Jeremy Fitzhardinge wrote:
>   
>> Al Viro wrote:
>>     
>>> Works here...
>>>   
>>>       
>> Hm, doesn't here:
>>
>>   CC      arch/i386/kernel/irq.o
>> /home/jeremy/hg/xen/paravirt/linux/arch/i386/kernel/irq.c: In function '__BUG':
>> include2/asm/bug.h:29: warning: 'noreturn' function does return
>>
>> This is with current FC7 distro gcc: gcc version 4.1.2 20070502 (Red Hat
>> 4.1.2-12)
>>     
>
> Interesting...  Looks like it's both version- and flags-dependent.
> Oh, well...
>
> BTW, alpha, frv, m68k and s390 have BUG() that is not recognized as
> noreturn by gcc.
>   

Yes, it was something I added because I thought it would be useful. 
Traditionally, BUG has not affected gcc's control flow analysis.

The other option is trying to use __builtin_trap, which happens to
generate ud2a on i386.  But I don't think its necessarily guaranteed to
always do that, and I don't know if it does anything useful for other
architectures.

    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