Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6057c50c19d94174814e90503caa0aa5@AcuMS.aculab.com>
Date: Thu, 22 Mar 2018 15:13:10 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Kees Cook' <keescook@...omium.org>, Linus Torvalds
	<torvalds@...ux-foundation.org>
CC: Al Viro <viro@...iv.linux.org.uk>, Florian Weimer <fweimer@...hat.com>,
	Andrew Morton <akpm@...ux-foundation.org>, Josh Poimboeuf
	<jpoimboe@...hat.com>, Rasmus Villemoes <linux@...musvillemoes.dk>, "Randy
 Dunlap" <rdunlap@...radead.org>, Miguel Ojeda
	<miguel.ojeda.sandonis@...il.com>, Ingo Molnar <mingo@...nel.org>, Ian Abbott
	<abbotti@....co.uk>, linux-input <linux-input@...r.kernel.org>, linux-btrfs
	<linux-btrfs@...r.kernel.org>, Network Development <netdev@...r.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>, Kernel Hardening
	<kernel-hardening@...ts.openwall.com>
Subject: RE: [PATCH v5 0/2] Remove false-positive VLAs when using max()

From: Kees Cook
> Sent: 22 March 2018 15:01
...
> >   /* Glory to Martin Uecker <Martin.Uecker@....uni-goettingen.de> */
> >   #define __is_constant(a) \
> >         (sizeof(int) == sizeof(*(1 ? ((void*)((a) * 0l)) : (int*)1)))
...
> So, this time it's not a catastrophic failure with gcc 4.4. Instead it
> fails in 11 distinct places:
...
> Seems like it doesn't like void * arguments:
> 
> mm/percpu.c:
>                 void *ptr;
> ...
>                 base = min(ptr, base);

Try adding (unsigned long) before the (a).

	David

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.