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: <20090430103654.GB6900@wotan.suse.de>
Date:	Thu, 30 Apr 2009 12:36:54 +0200
From:	Nick Piggin <npiggin@...e.de>
To:	Valdis.Kletnieks@...edu, Pekka Enberg <penberg@...helsinki.fi>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org
Subject: Re: mmotm 2009-04-24-18-14 uploaded - NVidia indigestion

On Tue, Apr 28, 2009 at 12:01:21PM -0400, Valdis.Kletnieks@...edu wrote:
> On Tue, 28 Apr 2009 08:15:57 +0200, Nick Piggin said:
> 
> Here's the code (pretty much *all* the code):
> 
> > #include <linux/version.h>
> > #include <linux/utsname.h>
> > int main() {
> > 	if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) {
> > 		return 0;
> > 	} else {
> > 		return 1;
> > 	}
> > }
> 
> > Hmm, yes if you build without -O, then it appears like the compiler
> > trips over this. I wouldn't be unhappy with just removing the BUILD_BUG_ON,
> > but shouldn't the module be using -O[s2]?
> 
> It's a little autoconfig chunk from vendor code that determines if we're
> building on a sane/recent kernel.  Not the sort of thing you'd expect to
> need to invoke the frikking optimizer for program *correctness* :)
> 
> 

Pekka, can you apply this please?

Thanks,
Nick

--
SLQB: fix compile without optmisations

SLQB fails to build without -O, which causes some external code to trip
over. This BUILD_BUG_ON isn't so useful anyway because it is trivial to
follow that size will be constant, looking at the callers.

Signed-off-by: Nick Piggin <npiggin@...e.de>
---
Index: linux-2.6/include/linux/slqb_def.h
===================================================================
--- linux-2.6.orig/include/linux/slqb_def.h	2009-04-29 20:35:45.000000000 +1000
+++ linux-2.6/include/linux/slqb_def.h	2009-04-29 21:25:40.000000000 +1000
@@ -237,8 +238,6 @@ static __always_inline struct kmem_cache
 {
 	int index;
 
-	BUILD_BUG_ON(!__builtin_constant_p(size));
-
 	index = kmalloc_index(size);
 	if (unlikely(index == 0))
 		return ZERO_SIZE_PTR;
--
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