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: <Pine.LNX.4.64.0705012320560.21985@chino.kir.corp.google.com>
Date:	Tue, 1 May 2007 23:25:38 -0700 (PDT)
From:	David Rientjes <rientjes@...gle.com>
To:	Rusty Russell <rusty@...tcorp.com.au>
cc:	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [patch 01/10] compiler: define __attribute_unused__

On Tue, 1 May 2007, David Rientjes wrote:

> The patched version makes this:
> 
> 	int type __attribute_unused__ = 0;
> 
> which definitely tells you that you're using a compiler attribute that 
> will be attached to that automatic.  In your case:
> 
> 	int type __unneeded = 0;
> 
> doesn't say anything in this case.  It doesn't resemble any attribute that 
> a programmer might be familiar with and begs the question of why we've 
> declared it if it's truly "unneeded"?
> 

One possible way to remedy this situation is with __needed and 
__maybe_unneeded.

__needed would be defined to __attribute__ ((used)), which would apply to 
functions only and specify that its code needs to be emitted anyway even 
though it appears to be unreferenced.  This is needed for gcc >=3.4.  In 
gcc <3.4, this gets defined to be __attribute__ ((unused)) to simply 
suppress the warning.  So now all functions that are unreferenced except 
in inline assembly get __needed appended.

__maybe_unneeded would be defined to __attribute__ ((unused)).  It can 
apply to either functions or variables to suppress the warning if they are 
unused.
-
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