mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michal Marek <mmarek@suse.com>
To: Kees Cook <keescook@chromium.org>
Cc: Ingo Molnar <mingo@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	x86@kernel.org, linux-kbuild@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [RESEND][PATCH] kbuild: Abort build on bad stack protector flag
Date: Tue, 26 Jul 2016 23:06:13 +0200	[thread overview]
Message-ID: <20160726210613.GA26777@sepie.suse.cz> (raw)
In-Reply-To: <20160712223043.GA11664@www.outflux.net>

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@chromium.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.

Michal

  reply	other threads:[~2016-07-26 21:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-12 22:30 Kees Cook
2016-07-26 21:06 ` Michal Marek [this message]
2016-07-26 21:22   ` Kees Cook

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160726210613.GA26777@sepie.suse.cz \
    --to=mmarek@suse.com \
    --cc=akpm@linux-foundation.org \
    --cc=keescook@chromium.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®