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: <20080107202050.6926ae46@laptopd505.fenrus.org>
Date:	Mon, 7 Jan 2008 20:20:50 -0800
From:	Arjan van de Ven <arjan@...radead.org>
To:	Christoph Lameter <clameter@....com>
Cc:	Kamalesh Babulal <kamalesh@...ux.vnet.ibm.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	bunk@...nel.org, Andrew Morton <akpm@...ux-foundation.org>,
	Andy Whitcroft <apw@...dowen.org>,
	Balbir Singh <balbir@...ux.vnet.ibm.com>
Subject: Re: Linux 2.6.24-rc7 Build-Failure at
 __you_cannot_kmalloc_that_much

On Mon, 7 Jan 2008 10:31:53 -0800 (PST)
Christoph Lameter <clameter@....com> wrote:

> We could replace the __you_cannot_kmalloc_that_much() with a BUG() 
> statement so we have the same effect in SLAB?
> 

sounds like a bad idea; a compile time failure is of course nicer than
a runtime failure for the cases we can find the bug at compile-time already.

We should however investigate using one of the two following gcc function attributes;
they can give the user a lot better diagnostic information than what we have
right now:


error ("message")
    If this attribute is used on a function declaration and a call to
such a function is not eliminated through dead code elimination or
other optimizations, an error which will include message will be
diagnosed. This is useful for compile time checking, especially
together with __builtin_constant_p and inline functions where checking
the inline function arguments is not possible through extern char
[(condition) ? 1 : -1]; tricks. While it is possible to leave the
function undefined and thus invoke a link failure, when using this
attribute the problem will be diagnosed earlier and with exact location
of the call even in presence of inline functions or when not emitting
debugging information.

warning ("message")
    If this attribute is used on a function declaration and a call to
such a function is not eliminated through dead code elimination or
other optimizations, a warning which will include message will be
diagnosed. This is useful for compile time checking, especially
together with __builtin_constant_p and inline functions. While it is
possible to define the function with a message in .gnu.warning*
section, when using this attribute the problem will be diagnosed
earlier and with exact location of the call even in presence of inline
functions or when not emitting debugging information. 

-- 
If you want to reach me at my work email, use arjan@...ux.intel.com
For development, discussion and tips for power savings, 
visit http://www.lesswatts.org
--
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