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]
Date:   Thu, 14 Jun 2018 02:28:36 +0900
From:   Masahiro Yamada <yamada.masahiro@...ionext.com>
To:     Linus Torvalds <torvalds@...ux-foundation.org>
Cc:     Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [GIT PULL] Kbuild updates for 4.18 (2nd round)

Hi Linus,

2018-06-14 1:03 GMT+09:00 Linus Torvalds <torvalds@...ux-foundation.org>:
> On Wed, Jun 13, 2018 at 8:55 AM Linus Torvalds
> <torvalds@...ux-foundation.org> wrote:
>>
>> On Wed, Jun 13, 2018 at 7:47 AM Masahiro Yamada
>> <yamada.masahiro@...ionext.com> wrote:
>> >
>> > Please pull more Kbuild updates.
>>
>> Pulled. However, I notice a few oddities.
>
> Oh, and one actual bug: "make oldconfig" doesn't work right.
>
> I used to have
>
>   CONFIG_HAVE_CC_STACKPROTECTOR=y
>   # CONFIG_CC_STACKPROTECTOR_NONE is not set
>   # CONFIG_CC_STACKPROTECTOR_REGULAR is not set
>   # CONFIG_CC_STACKPROTECTOR_STRONG is not set
>   CONFIG_CC_STACKPROTECTOR_AUTO=y
>
> which means that since my compiler supports -fstack-protector-strong,
> I should get CONFIG_CC_STACKPROTECTOR_STRONG.
>
> But that's not at all what I get. I get
>
>   CONFIG_HAVE_CC_STACKPROTECTOR=y
>   CONFIG_CC_HAS_STACKPROTECTOR_NONE=y
>   CONFIG_CC_STACKPROTECTOR=y
>   # CONFIG_CC_STACKPROTECTOR_STRONG is not set
>   CONFIG_CC_HAS_SANE_STACKPROTECTOR=y
>
> ie CONFIG_CC_STACKPROTECTOR_STRONG basically went away.
>
> The reason for that is that it takes the *old* value of
> CONFIG_CC_STACKPROTECTOR_STRONG, which was "no", but that's wrong.
>
> The meaning of the config option has changed, but it took the default
> from the old meaning, and decided that I shouldn't get strong stack
> protection any more.
>
> This is a pretty dangerous silent change.
>
>                Linus


Sorry, I did not notice this case.


I cannot come up with a name better than CC_STACKPROTECTOR_STRONG.


Another solution might be,
to add _AUTO back again for the backward-compatibility.


config CC_STACKPROTECTOR_AUTO
       bool "Stack Protector Auto (backward compatibility)"
       select CC_STACKPROTECTOR_STRONG if $(cc-option,-fstack-protector-strong)
       select CC_STACKPROTECTOR if $(cc-option,-fstack-protector)
       depends on HAVE_CC_STACKPROTECTOR
       help
         This option is here to not break "make oldconfig". If the old .config
         file enabled CC_STACKPROTECTOR_AUTO, CC_STACKPROTECTOR_STRONG should
         be enabled when compiler supports it.
         This will be removed after v4.19.



If a user previously chose _AUTO
and the compiler supports -fstack-protector-strong,
CC_STACKPROTECTOR_STRONG is forcibly enabled.

Of course, this is ugly.
I do not want to carry it for a long time
even if we decide this is necessary.

-- 
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists