Re: [RFC PATCH 4/7] kconfig: support new special property shell

2018-02-15 Thread Palmer Dabbelt
On Sun, 11 Feb 2018 12:06:35 PST (-0800), Linus Torvalds wrote: On Sun, Feb 11, 2018 at 11:53 AM, Linus Torvalds wrote: Well, it's still not a very *big* bump. With modern distros being at 7.3, and people testing pre-releases of gcc-8, something like gcc-4.5 is still pretty darn ancient. ...

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-13 Thread Masahiro Yamada
2018-02-13 17:35 GMT+09:00 Arnd Bergmann : > On Tue, Feb 13, 2018 at 2:53 AM, Randy Dunlap wrote: >> On 02/12/2018 05:41 PM, Masahiro Yamada wrote: >>> 2018-02-13 8:48 GMT+09:00 Randy Dunlap : On 02/12/2018 07:24 AM, Kees Cook wrote: > On Mon, Feb 12, 2018 at 6:39 AM, Masahiro Yamada

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-13 Thread Ulf Magnusson
On Tue, Feb 13, 2018 at 01:10:34AM +0900, Masahiro Yamada wrote: > 2018-02-13 0:46 GMT+09:00 Kees Cook : > > On Mon, Feb 12, 2018 at 2:44 AM, Masahiro Yamada > > wrote: > >> Linus said: > >> > >>> But yes, I also reacted to your earlier " It can't silently rewrite it > >>> to _REGULAR because the

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-13 Thread Arnd Bergmann
On Tue, Feb 13, 2018 at 2:53 AM, Randy Dunlap wrote: > On 02/12/2018 05:41 PM, Masahiro Yamada wrote: >> 2018-02-13 8:48 GMT+09:00 Randy Dunlap : >>> On 02/12/2018 07:24 AM, Kees Cook wrote: On Mon, Feb 12, 2018 at 6:39 AM, Masahiro Yamada wrote: >>> >> (And in thinking about this,

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-12 Thread Randy Dunlap
On 02/12/2018 05:41 PM, Masahiro Yamada wrote: > 2018-02-13 8:48 GMT+09:00 Randy Dunlap : >> On 02/12/2018 07:24 AM, Kees Cook wrote: >>> On Mon, Feb 12, 2018 at 6:39 AM, Masahiro Yamada >>> wrote: >> > (And in thinking about this, does Kconfig know the true $CC in use? > i.e. the configur

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-12 Thread Masahiro Yamada
2018-02-13 8:48 GMT+09:00 Randy Dunlap : > On 02/12/2018 07:24 AM, Kees Cook wrote: >> On Mon, Feb 12, 2018 at 6:39 AM, Masahiro Yamada >> wrote: > (And in thinking about this, does Kconfig know the true $CC in use? i.e. the configured cross compiler, etc?) >>> >>> I was thinking of remo

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-12 Thread Randy Dunlap
On 02/12/2018 07:24 AM, Kees Cook wrote: > On Mon, Feb 12, 2018 at 6:39 AM, Masahiro Yamada > wrote: >>> (And in thinking about this, does Kconfig know the true $CC in use? >>> i.e. the configured cross compiler, etc?) >> >> I was thinking of removing CONFIG_CROSS_COMPILE. >> >> A user can dynami

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-12 Thread Kees Cook
On Mon, Feb 12, 2018 at 9:36 AM, David Woodhouse wrote: > On Mon, 2018-02-12 at 09:33 -0800, Kees Cook wrote: >> On Mon, Feb 12, 2018 at 9:05 AM, Peter Zijlstra wrote: >> > On Mon, Feb 12, 2018 at 08:56:31AM -0800, Kees Cook wrote: >> >> That would be bad: Android exclusively builds with clang. >

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-12 Thread David Woodhouse
On Mon, 2018-02-12 at 09:33 -0800, Kees Cook wrote: > On Mon, Feb 12, 2018 at 9:05 AM, Peter Zijlstra wrote: > > On Mon, Feb 12, 2018 at 08:56:31AM -0800, Kees Cook wrote: > >> That would be bad: Android exclusively builds with clang. > > > > So implement asm-goto already, and do asm-cc-output whi

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-12 Thread Kees Cook
On Mon, Feb 12, 2018 at 9:05 AM, Peter Zijlstra wrote: > On Mon, Feb 12, 2018 at 08:56:31AM -0800, Kees Cook wrote: >> That would be bad: Android exclusively builds with clang. > > So implement asm-goto already, and do asm-cc-output while you're at it. Yup, I've already been asking for it. I'm ho

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-12 Thread Peter Zijlstra
On Mon, Feb 12, 2018 at 08:56:31AM -0800, Kees Cook wrote: > That would be bad: Android exclusively builds with clang. So implement asm-goto already, and do asm-cc-output while you're at it. The whole asm-goto/jump_label stuff really does make a measureable difference in performance, and its bloo

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-12 Thread Peter Zijlstra
On Mon, Feb 12, 2018 at 04:19:22PM +, David Woodhouse wrote: > On Mon, 2018-02-12 at 09:26 +0100, Peter Zijlstra wrote: > > On Sun, Feb 11, 2018 at 10:13:44AM -0800, Linus Torvalds wrote: > > > > > That actually sounds like we could just > > >  > > >  (a) make gcc 4.5 be the minimum required v

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-12 Thread Kees Cook
On Mon, Feb 12, 2018 at 8:19 AM, David Woodhouse wrote: > On Mon, 2018-02-12 at 09:26 +0100, Peter Zijlstra wrote: >> On Sun, Feb 11, 2018 at 10:13:44AM -0800, Linus Torvalds wrote: >> >> > That actually sounds like we could just >> > >> > (a) make gcc 4.5 be the minimum required version >> > >>

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-12 Thread David Woodhouse
On Mon, 2018-02-12 at 09:26 +0100, Peter Zijlstra wrote: > On Sun, Feb 11, 2018 at 10:13:44AM -0800, Linus Torvalds wrote: > > > That actually sounds like we could just > >  > >  (a) make gcc 4.5 be the minimum required version > >  > >  (b) actually error out if we find a bad compiler > > So the

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-12 Thread Masahiro Yamada
2018-02-13 0:46 GMT+09:00 Kees Cook : > On Mon, Feb 12, 2018 at 2:44 AM, Masahiro Yamada > wrote: >> Linus said: >> >>> But yes, I also reacted to your earlier " It can't silently rewrite it >>> to _REGULAR because the compiler support for _STRONG regressed." >>> Because it damn well can. If the c

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-12 Thread Kees Cook
On Mon, Feb 12, 2018 at 2:44 AM, Masahiro Yamada wrote: > Linus said: > >> But yes, I also reacted to your earlier " It can't silently rewrite it >> to _REGULAR because the compiler support for _STRONG regressed." >> Because it damn well can. If the compiler doesn't support >> -fstack-protector-st

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-12 Thread Ulf Magnusson
On Mon, Feb 12, 2018 at 4:22 PM, Masahiro Yamada wrote: > 2018-02-12 23:53 GMT+09:00 Ulf Magnusson : >> On Mon, Feb 12, 2018 at 3:21 PM, Masahiro Yamada >> wrote: >>> 'syncconfig' in a more proper name >> >> Wonder if --update-config-files-for-build or something would be an >> even better name. >

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-12 Thread Kees Cook
On Mon, Feb 12, 2018 at 6:39 AM, Masahiro Yamada wrote: > 2018-02-12 2:56 GMT+09:00 Kees Cook : >> I think it would work to skip KBUILD_CPPFLAGS right up until it >> didn't. Since we have the arch split, we can already add -m32 to the >> 32-bit case, etc. However, I worry about interaction with ot

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-12 Thread Masahiro Yamada
2018-02-12 23:53 GMT+09:00 Ulf Magnusson : > On Mon, Feb 12, 2018 at 3:21 PM, Masahiro Yamada > wrote: >> 'syncconfig' in a more proper name > > Wonder if --update-config-files-for-build or something would be an > even better name. I want to use a name that ends with 'config' like any other confi

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-12 Thread Ulf Magnusson
On Mon, Feb 12, 2018 at 3:21 PM, Masahiro Yamada wrote: > 'syncconfig' in a more proper name Wonder if --update-config-files-for-build or something would be an even better name. Kinda tough to compress it into something that adheres to *nix terseness while making it somewhat clear what kind of s

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-12 Thread Masahiro Yamada
2018-02-12 2:56 GMT+09:00 Kees Cook : > I think it would work to skip KBUILD_CPPFLAGS right up until it > didn't. Since we have the arch split, we can already add -m32 to the > 32-bit case, etc. However, I worry about interaction with other > selected build options. For example, while retpoline do

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-12 Thread Ulf Magnusson
On Mon, Feb 12, 2018 at 3:23 PM, Masahiro Yamada wrote: > 2018-02-12 23:21 GMT+09:00 Masahiro Yamada : >> 2018-02-12 21:54 GMT+09:00 Ulf Magnusson : >>> On Sun, Feb 11, 2018 at 09:42:09PM +0100, Ulf Magnusson wrote: On Sun, Feb 11, 2018 at 9:29 PM, Ulf Magnusson wrote: > On Sun, Feb 11,

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-12 Thread Ulf Magnusson
On Mon, Feb 12, 2018 at 3:21 PM, Masahiro Yamada wrote: > 2018-02-12 21:54 GMT+09:00 Ulf Magnusson : >> On Sun, Feb 11, 2018 at 09:42:09PM +0100, Ulf Magnusson wrote: >>> On Sun, Feb 11, 2018 at 9:29 PM, Ulf Magnusson wrote: >>> > On Sun, Feb 11, 2018 at 6:56 PM, Kees Cook wrote: >>> >> Another

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-12 Thread Masahiro Yamada
2018-02-12 23:21 GMT+09:00 Masahiro Yamada : > 2018-02-12 21:54 GMT+09:00 Ulf Magnusson : >> On Sun, Feb 11, 2018 at 09:42:09PM +0100, Ulf Magnusson wrote: >>> On Sun, Feb 11, 2018 at 9:29 PM, Ulf Magnusson wrote: >>> > On Sun, Feb 11, 2018 at 6:56 PM, Kees Cook wrote: >>> >> Another case I menti

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-12 Thread Masahiro Yamada
2018-02-12 21:54 GMT+09:00 Ulf Magnusson : > On Sun, Feb 11, 2018 at 09:42:09PM +0100, Ulf Magnusson wrote: >> On Sun, Feb 11, 2018 at 9:29 PM, Ulf Magnusson wrote: >> > On Sun, Feb 11, 2018 at 6:56 PM, Kees Cook wrote: >> >> Another case I mentioned before that I just want to make sure we don't

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-12 Thread Ulf Magnusson
On Mon, Feb 12, 2018 at 2:53 PM, Masahiro Yamada wrote: > 2018-02-12 20:44 GMT+09:00 Ulf Magnusson : > >>> >>> I think Linus's comment was dismissed here. >>> >>> >>> Linus said: >>> But yes, I also reacted to your earlier " It can't silently rewrite it to _REGULAR because the compiler s

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-12 Thread Masahiro Yamada
2018-02-12 20:44 GMT+09:00 Ulf Magnusson : >> >> I think Linus's comment was dismissed here. >> >> >> Linus said: >> >>> But yes, I also reacted to your earlier " It can't silently rewrite it >>> to _REGULAR because the compiler support for _STRONG regressed." >>> Because it damn well can. If the

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-12 Thread Ulf Magnusson
On Sun, Feb 11, 2018 at 09:42:09PM +0100, Ulf Magnusson wrote: > On Sun, Feb 11, 2018 at 9:29 PM, Ulf Magnusson wrote: > > On Sun, Feb 11, 2018 at 6:56 PM, Kees Cook wrote: > >> Another case I mentioned before that I just want to make sure we don't > >> reintroduce the problem of getting "stuck"

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-12 Thread Peter Zijlstra
On Mon, Feb 12, 2018 at 11:27:25AM +0100, Thomas Gleixner wrote: > On Mon, 12 Feb 2018, Peter Zijlstra wrote: > > > On Sun, Feb 11, 2018 at 10:13:44AM -0800, Linus Torvalds wrote: > > > > > That actually sounds like we could just > > > > > > (a) make gcc 4.5 be the minimum required version > >

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-12 Thread Ulf Magnusson
On Mon, Feb 12, 2018 at 12:44 PM, Ulf Magnusson wrote: > On Mon, Feb 12, 2018 at 11:44 AM, Masahiro Yamada > wrote: >> 2018-02-11 19:34 GMT+09:00 Ulf Magnusson : >>> Looks to me like there's a few unrelated issues here: >>> >>> >>> 1. The stack protector support test scripts >>> >>> Worthwhile IM

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-12 Thread Ulf Magnusson
On Mon, Feb 12, 2018 at 11:44 AM, Masahiro Yamada wrote: > 2018-02-11 19:34 GMT+09:00 Ulf Magnusson : >> Looks to me like there's a few unrelated issues here: >> >> >> 1. The stack protector support test scripts >> >> Worthwhile IMO if they (*in practice*) prevent hard-to-debug build errors or >>

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-12 Thread Masahiro Yamada
2018-02-11 19:34 GMT+09:00 Ulf Magnusson : > Looks to me like there's a few unrelated issues here: > > > 1. The stack protector support test scripts > > Worthwhile IMO if they (*in practice*) prevent hard-to-debug build errors or a > subtly broken kernel from being built. > > A few questions: > >

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-12 Thread Arnd Bergmann
On Sun, Feb 11, 2018 at 10:50 PM, Linus Torvalds wrote: > On Sun, Feb 11, 2018 at 1:19 PM, Kees Cook wrote: >> On Sun, Feb 11, 2018 at 1:10 PM, Arnd Bergmann wrote: >>> >>> In my tests last year, I identified gcc-4.6 as a nice minimum level, IIRC >>> gcc-4.5 was unable to build some of the newer

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-12 Thread Thomas Gleixner
On Mon, 12 Feb 2018, Peter Zijlstra wrote: > On Sun, Feb 11, 2018 at 10:13:44AM -0800, Linus Torvalds wrote: > > > That actually sounds like we could just > > > > (a) make gcc 4.5 be the minimum required version > > > > (b) actually error out if we find a bad compiler > > So the unofficial p

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-12 Thread Peter Zijlstra
On Sun, Feb 11, 2018 at 10:13:44AM -0800, Linus Torvalds wrote: > That actually sounds like we could just > > (a) make gcc 4.5 be the minimum required version > > (b) actually error out if we find a bad compiler So the unofficial plan was to enforce asm-goto and -fentry support by hard failur

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-11 Thread Geert Uytterhoeven
On Sun, Feb 11, 2018 at 10:10 PM, Arnd Bergmann wrote: > On Sun, Feb 11, 2018 at 9:06 PM, Linus Torvalds > wrote: >> On Sun, Feb 11, 2018 at 11:53 AM, Linus Torvalds >> wrote: >>> >>> Well, it's still not a very *big* bump. With modern distros being at >>> 7.3, and people testing pre-releases of

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-11 Thread Linus Torvalds
On Sun, Feb 11, 2018 at 1:19 PM, Kees Cook wrote: > On Sun, Feb 11, 2018 at 1:10 PM, Arnd Bergmann wrote: >> >> In my tests last year, I identified gcc-4.6 as a nice minimum level, IIRC >> gcc-4.5 was unable to build some of the newer ARM targets. > > But yes, if Linus wants 4.5 over 4.3, I would

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-11 Thread Ulf Magnusson
On Sun, Feb 11, 2018 at 10:05 PM, Kees Cook wrote: > On Sun, Feb 11, 2018 at 10:34 AM, Ulf Magnusson wrote: >> On Sun, Feb 11, 2018 at 6:56 PM, Kees Cook wrote: >>> Old? That's not the case. The check for -fno-stack-protector will >>> likely be needed forever, as some distro compilers enable >>>

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-11 Thread Ulf Magnusson
On Sun, Feb 11, 2018 at 6:56 PM, Kees Cook wrote: >> 3. Whether to implement CC_STACKPROTECTOR_AUTO in Kconfig or the Makefiles >> >> I'd just go with whatever is simplest here. I don't find the Kconfig version >> too bad, but I'm already very familiar with Kconfig, so it's harder for me to >> tel

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-11 Thread Kees Cook
On Sun, Feb 11, 2018 at 1:10 PM, Arnd Bergmann wrote: > On Sun, Feb 11, 2018 at 9:06 PM, Linus Torvalds > wrote: >> On Sun, Feb 11, 2018 at 11:53 AM, Linus Torvalds >> wrote: >>> >>> Well, it's still not a very *big* bump. With modern distros being at >>> 7.3, and people testing pre-releases of

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-11 Thread Kees Cook
On Sun, Feb 11, 2018 at 11:53 AM, Linus Torvalds wrote: > On Sun, Feb 11, 2018 at 11:39 AM, Kees Cook wrote: >> This made akpm and Arnd very very grumpy as it regressed their builds. >> That's why I had to deal with the condition very carefully for _AUTO. > > Well, Arnd build new cross-tools last

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-11 Thread Arnd Bergmann
On Sun, Feb 11, 2018 at 9:06 PM, Linus Torvalds wrote: > On Sun, Feb 11, 2018 at 11:53 AM, Linus Torvalds > wrote: >> >> Well, it's still not a very *big* bump. With modern distros being at >> 7.3, and people testing pre-releases of gcc-8, something like gcc-4.5 >> is still pretty darn ancient. >

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-11 Thread Kees Cook
On Sun, Feb 11, 2018 at 10:34 AM, Ulf Magnusson wrote: > On Sun, Feb 11, 2018 at 6:56 PM, Kees Cook wrote: >> Old? That's not the case. The check for -fno-stack-protector will >> likely be needed forever, as some distro compilers enable >> stack-protector by default. So when someone wants to expl

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-11 Thread Ulf Magnusson
On Sun, Feb 11, 2018 at 9:29 PM, Ulf Magnusson wrote: > On Sun, Feb 11, 2018 at 6:56 PM, Kees Cook wrote: >> Another case I mentioned before that I just want to make sure we don't >> reintroduce the problem of getting "stuck" with a bad .config file. >> While adding _STRONG support, I discovered

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-11 Thread Ulf Magnusson
On Sun, Feb 11, 2018 at 6:56 PM, Kees Cook wrote: > Another case I mentioned before that I just want to make sure we don't > reintroduce the problem of getting "stuck" with a bad .config file. > While adding _STRONG support, I discovered the two-phase Kconfig > resolution that happens during the b

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-11 Thread Linus Torvalds
On Sun, Feb 11, 2018 at 11:53 AM, Linus Torvalds wrote: > > Well, it's still not a very *big* bump. With modern distros being at > 7.3, and people testing pre-releases of gcc-8, something like gcc-4.5 > is still pretty darn ancient. ... it's worth noting that our _documentation_ may claim that gc

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-11 Thread Linus Torvalds
On Sun, Feb 11, 2018 at 11:39 AM, Kees Cook wrote: >> >> (a) make gcc 4.5 be the minimum required version > > I love bumping minimum for so many reason more than just stack protector. :) Well, it's still not a very *big* bump. With modern distros being at 7.3, and people testing pre-releases of

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-11 Thread Linus Torvalds
On Sun, Feb 11, 2018 at 10:13 AM, Linus Torvalds wrote: > > That actually sounds like we could just > > (a) make gcc 4.5 be the minimum required version > > (b) actually error out if we find a bad compiler Just to explain why that's different from what we do not (apart from the "error out" thin

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-11 Thread Kees Cook
On Sun, Feb 11, 2018 at 10:13 AM, Linus Torvalds wrote: > On Sun, Feb 11, 2018 at 9:56 AM, Kees Cook wrote: >> >>> - How common are those broken compilers? >> >> I *thought* it was rare (i.e. gcc 4.2) but while working on ..._AUTO I >> found breakage in akpm's 4.4 gcc, and all of Arnd's gccs

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-11 Thread Ulf Magnusson
On Sun, Feb 11, 2018 at 6:56 PM, Kees Cook wrote: > Old? That's not the case. The check for -fno-stack-protector will > likely be needed forever, as some distro compilers enable > stack-protector by default. So when someone wants to explicitly build > without stack-protector (or if the compiler's

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-11 Thread Linus Torvalds
On Sun, Feb 11, 2018 at 9:56 AM, Kees Cook wrote: > >> - How common are those broken compilers? > > I *thought* it was rare (i.e. gcc 4.2) but while working on ..._AUTO I > found breakage in akpm's 4.4 gcc, and all of Arnd's gccs due to some > very strange misconfiguration between the gcc buil

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-11 Thread Kees Cook
On Sun, Feb 11, 2018 at 2:34 AM, Ulf Magnusson wrote: > Looks to me like there's a few unrelated issues here: > > > 1. The stack protector support test scripts > > Worthwhile IMO if they (*in practice*) prevent hard-to-debug build errors or a > subtly broken kernel from being built. > > A few ques

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-11 Thread Kees Cook
On Sat, Feb 10, 2018 at 11:28 PM, Linus Torvalds wrote: > On Sat, Feb 10, 2018 at 8:46 PM, Linus Torvalds > wrote: >> >> Argh. I wanted to get rid of all that entirely, and simplify this all. >> The mentioned script (and bugzilla) was from 2006, I assumed this was >> all historical. >> >> But if

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-11 Thread Ulf Magnusson
Looks to me like there's a few unrelated issues here: 1. The stack protector support test scripts Worthwhile IMO if they (*in practice*) prevent hard-to-debug build errors or a subtly broken kernel from being built. A few questions: - How do things fail with a broken stack protector implem

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-10 Thread Linus Torvalds
On Sat, Feb 10, 2018 at 8:46 PM, Linus Torvalds wrote: > > Argh. I wanted to get rid of all that entirely, and simplify this all. > The mentioned script (and bugzilla) was from 2006, I assumed this was > all historical. > > But if it has broken again since, I guess we need to have a silly script.

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-10 Thread Linus Torvalds
On Sat, Feb 10, 2018 at 8:13 PM, Kees Cook wrote: > > It's been there since the very beginning when Arjan added it to > validate that the compiler actually produces a stack protector when > you give it -fstack-protector. Older gccs broke this entirely, more > recent misconfigurations (as seen with

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-10 Thread Kees Cook
On Sat, Feb 10, 2018 at 12:08 PM, Linus Torvalds wrote: > On Sat, Feb 10, 2018 at 11:23 AM, Kees Cook wrote: >> >> So, if this could do something like this: >> >> config CC_HAS_STACKPROTECTOR_STRONG >> bool >> option >> shell="scripts/gcc-${ARCH}_${BITS}-ha

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-10 Thread Kevin Easton
On Sat, Feb 10, 2018 at 10:05:12AM -0800, Randy Dunlap wrote: > On 02/10/2018 12:55 AM, Ulf Magnusson wrote: > > How many compilers don't support -fno-stack-protector by the way? > > > > config CC_HAS_STACKPROTECTOR_STRONG > > bool > > option shell="$CC -Werror -fstack-

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-10 Thread Linus Torvalds
On Sat, Feb 10, 2018 at 11:23 AM, Kees Cook wrote: > > So, if this could do something like this: > > config CC_HAS_STACKPROTECTOR_STRONG > bool > option > shell="scripts/gcc-${ARCH}_${BITS}-has-stack-protector.sh $CC > $KBUILD_CPPFLAGS" Guys, this is not th

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-10 Thread Kees Cook
On Sat, Feb 10, 2018 at 12:55 AM, Ulf Magnusson wrote: > Here's a complete updated example, with some stuff from Masahiro added. > > Turns out warnings inside choices get cut off easily in menuconfig, so I > went with just a single warning instead (which should be enough anyway). > > With this ver

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-10 Thread Randy Dunlap
On 02/10/2018 12:55 AM, Ulf Magnusson wrote: > How many compilers don't support -fno-stack-protector by the way? > > config CC_HAS_STACKPROTECTOR_STRONG > bool > option shell="$CC -Werror -fstack-protector-strong -c -x c > /dev/null" > > config CC_HA

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-10 Thread Ulf Magnusson
On Sat, Feb 10, 2018 at 09:55:19AM +0100, Ulf Magnusson wrote: > On Sat, Feb 10, 2018 at 09:05:56AM +0100, Ulf Magnusson wrote: > > On Sat, Feb 10, 2018 at 08:49:24AM +0100, Ulf Magnusson wrote: > > > On Sat, Feb 10, 2018 at 04:12:13PM +0900, Masahiro Yamada wrote: > > > > 2018-02-10 14:48 GMT+09:0

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-10 Thread Ulf Magnusson
On Sat, Feb 10, 2018 at 09:05:56AM +0100, Ulf Magnusson wrote: > On Sat, Feb 10, 2018 at 08:49:24AM +0100, Ulf Magnusson wrote: > > On Sat, Feb 10, 2018 at 04:12:13PM +0900, Masahiro Yamada wrote: > > > 2018-02-10 14:48 GMT+09:00 Ulf Magnusson : > > > > On Fri, Feb 09, 2018 at 12:46:54PM -0800, Kee

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-10 Thread Ulf Magnusson
On Sat, Feb 10, 2018 at 08:49:24AM +0100, Ulf Magnusson wrote: > On Sat, Feb 10, 2018 at 04:12:13PM +0900, Masahiro Yamada wrote: > > 2018-02-10 14:48 GMT+09:00 Ulf Magnusson : > > > On Fri, Feb 09, 2018 at 12:46:54PM -0800, Kees Cook wrote: > > >> On Fri, Feb 9, 2018 at 4:46 AM, Ulf Magnusson >

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-09 Thread Ulf Magnusson
On Sat, Feb 10, 2018 at 04:12:13PM +0900, Masahiro Yamada wrote: > 2018-02-10 14:48 GMT+09:00 Ulf Magnusson : > > On Fri, Feb 09, 2018 at 12:46:54PM -0800, Kees Cook wrote: > >> On Fri, Feb 9, 2018 at 4:46 AM, Ulf Magnusson wrote: > >> > One thing that makes Kconfig confusing (though it works well

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-09 Thread Masahiro Yamada
2018-02-10 14:48 GMT+09:00 Ulf Magnusson : > On Fri, Feb 09, 2018 at 12:46:54PM -0800, Kees Cook wrote: >> On Fri, Feb 9, 2018 at 4:46 AM, Ulf Magnusson wrote: >> > One thing that makes Kconfig confusing (though it works well enough in >> > practice) is that .config files both record user selectio

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-09 Thread Ulf Magnusson
On Fri, Feb 09, 2018 at 12:46:54PM -0800, Kees Cook wrote: > On Fri, Feb 9, 2018 at 4:46 AM, Ulf Magnusson wrote: > > One thing that makes Kconfig confusing (though it works well enough in > > practice) is that .config files both record user selections (the saved > > configuration) and serve as a

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-09 Thread Kees Cook
On Fri, Feb 9, 2018 at 4:46 AM, Ulf Magnusson wrote: > One thing that makes Kconfig confusing (though it works well enough in > practice) is that .config files both record user selections (the saved > configuration) and serve as a configuration output format for make. > > It becomes easier to thin

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-09 Thread Ulf Magnusson
On Fri, Feb 09, 2018 at 06:19:19PM +0900, Masahiro Yamada wrote: > 2018-02-09 14:30 GMT+09:00 Ulf Magnusson : > > On Fri, Feb 09, 2018 at 01:19:09AM +0900, Masahiro Yamada wrote: > >> This works with bool, int, hex, string types. > >> > >> For bool, the symbol is set to 'y' or 'n' depending on the

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-09 Thread Masahiro Yamada
2018-02-09 14:30 GMT+09:00 Ulf Magnusson : > On Fri, Feb 09, 2018 at 01:19:09AM +0900, Masahiro Yamada wrote: >> This works with bool, int, hex, string types. >> >> For bool, the symbol is set to 'y' or 'n' depending on the exit value >> of the command. >> >> For int, hex, string, the symbol is set

Re: [RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-08 Thread Ulf Magnusson
On Fri, Feb 09, 2018 at 01:19:09AM +0900, Masahiro Yamada wrote: > This works with bool, int, hex, string types. > > For bool, the symbol is set to 'y' or 'n' depending on the exit value > of the command. > > For int, hex, string, the symbol is set to the value to the stdout > of the command. (on

[RFC PATCH 4/7] kconfig: support new special property shell=

2018-02-08 Thread Masahiro Yamada
This works with bool, int, hex, string types. For bool, the symbol is set to 'y' or 'n' depending on the exit value of the command. For int, hex, string, the symbol is set to the value to the stdout of the command. (only the first line of the stdout) The following shows how to write this and how