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] [day] [month] [year] [list]
Message-ID: <CAGXu5jJZiC3rW4KJrezWJengX7KMK0pCRfoQ0Qwd=DeivfeMhg@mail.gmail.com>
Date:	Tue, 26 Jul 2016 14:22:55 -0700
From:	Kees Cook <keescook@...omium.org>
To:	Michal Marek <mmarek@...e.com>
Cc:	Ingo Molnar <mingo@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	"x86@...nel.org" <x86@...nel.org>,
	linux-kbuild <linux-kbuild@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [RESEND][PATCH] kbuild: Abort build on bad stack protector flag

On Tue, Jul 26, 2016 at 2:06 PM, Michal Marek <mmarek@...e.com> wrote:
> On Tue, Jul 12, 2016 at 03:30:43PM -0700, Kees Cook wrote:
>> Before, the stack protector flag was sanity checked before .config had
>> been reprocessed. This meant the build couldn't be aborted early, and
>> only a warning could be emitted followed later by the compiler blowing
>> up with an unknown flag. This has caused a lot of confusion over time,
>> so this splits the flag selection from sanity checking and performs the
>> sanity checking after the make has been restarted from a reprocessed
>> .config, so builds can be aborted as early as possible now.
>>
>> Additionally moves the x86-specific sanity check to the same location,
>> since it suffered from the same warn-then-wait-for-compiler-failure
>> problem.
>>
>> Signed-off-by: Kees Cook <keescook@...omium.org>
>
> Hi Kees,
>
> sorry for the late review.
>
>
>> +# Find arch-specific stack protector compiler sanity-checking script.
>> +ifdef CONFIG_CC_STACKPROTECTOR
>> +  stackp-path := $(srctree)/scripts/gcc-$(ARCH)_$(BITS)-has-stack-protector.sh
>
> You need to use SRCARCH here if you want "x86" on x86.
>
>
>> +  ifneq ($(wildcard $(stackp-path)),)
>> +    stackp-check := $(stackp-path)
>> +  endif
>
> stackp-check := $(wildcard $(stackp-path))
>
> is more straightforward. But the long version is correct as well.

Ah! Yes, thanks. I was thinking I needed to handle "defined but
empty", but that's not true for Makefiles. I'll send a v2 with this
and SRCARCH fixed.

-Kees

-- 
Kees Cook
Chrome OS & Brillo Security

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ