|
Message-Id: <20180309163241.a421e216999bd0b1f43a64c2@linux-foundation.org> Date: Fri, 9 Mar 2018 16:32:41 -0800 From: Andrew Morton <akpm@...ux-foundation.org> To: Linus Torvalds <torvalds@...ux-foundation.org> Cc: Kees Cook <keescook@...omium.org>, Linux Kernel Mailing List <linux-kernel@...r.kernel.org>, Josh Poimboeuf <jpoimboe@...hat.com>, Rasmus Villemoes <linux@...musvillemoes.dk>, "Gustavo A. R. Silva" <gustavo@...eddedor.com>, "Tobin C. Harding" <me@...in.cc>, Steven Rostedt <rostedt@...dmis.org>, Jonathan Corbet <corbet@....net>, Chris Mason <clm@...com>, Josef Bacik <jbacik@...com>, David Sterba <dsterba@...e.com>, "David S. Miller" <davem@...emloft.net>, Alexey Kuznetsov <kuznet@....inr.ac.ru>, Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>, Ingo Molnar <mingo@...nel.org>, Peter Zijlstra <peterz@...radead.org>, Thomas Gleixner <tglx@...utronix.de>, Masahiro Yamada <yamada.masahiro@...ionext.com>, Borislav Petkov <bp@...e.de>, Randy Dunlap <rdunlap@...radead.org>, Ian Abbott <abbotti@....co.uk>, Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>, Petr Mladek <pmladek@...e.com>, Andy Shevchenko <andriy.shevchenko@...ux.intel.com>, Pantelis Antoniou <pantelis.antoniou@...sulko.com>, Linux Btrfs <linux-btrfs@...r.kernel.org>, Network Development <netdev@...r.kernel.org>, Kernel Hardening <kernel-hardening@...ts.openwall.com> Subject: Re: [PATCH v3] kernel.h: Skip single-eval logic on literals in min()/max() On Fri, 9 Mar 2018 16:28:51 -0800 Linus Torvalds <torvalds@...ux-foundation.org> wrote: > On Fri, Mar 9, 2018 at 4:07 PM, Andrew Morton <akpm@...ux-foundation.org> wrote: > > > > A brief poke failed to reveal a workaround - gcc-4.4.4 doesn't appear > > to know that __builtin_constant_p(x) is a constant. Or something. > > LOL. > > I suspect it might be that it wants to evaluate > __builtin_choose_expr() at an earlier stage than it evaluates > __builtin_constant_p(), so it's not that it doesn't know that > __builtin_constant_p() is a constant, it just might not know it *yet*. > > Maybe. > > Side note, if it's not that, but just the "complex" expression that > has the logical 'and' etc, maybe the code could just use > > __builtin_constant_p((x)+(y)) > > or something. I'll do a bit more poking at it. > But yeah: > > > Sigh. Wasn't there some talk about modernizing our toolchain > > requirements? > > Maybe it's just time to give up on 4.4. We wanted 4.5 for "asm goto", > and once we upgrade to 4.5 I think Arnd said that no distro actually > ships it, so we might as well go to 4.6. > > So maybe this is just the excuse to finally make that official, if > there is no clever workaround any more. I wonder which gcc versions actually accept Kees's addition.
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.