From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: linux-kernel@vger.kernel.org
Cc: Michal Marek <mmarek@suse.com>,
linux-kbuild@vger.kernel.org, x86@kernel.org,
Al Viro <viro@ZenIV.linux.org.uk>,
Ben Hutchings <ben@decadent.org.uk>,
Sven Joachim <svenjoac@gmx.de>,
"Austin S. Hemmelgarn" <ahferroin7@gmail.com>,
Borislav Petkov <bp@alien8.de>
Subject: [PATCH 2/3] scripts/has-stack-protector: add -fno-PIE
Date: Fri, 4 Nov 2016 19:39:39 +0100 [thread overview]
Message-ID: <20161104183940.30692-3-bigeasy@linutronix.de> (raw)
In-Reply-To: <20161104183940.30692-1-bigeasy@linutronix.de>
Adding -no-PIE to the fstack protector check. -no-PIE was introduced
before -fstack-protector so there is no need for a runtime check.
Without it the build stops:
|Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong available but compiler is broken
due to -mcmodel=kernel + -fPIE if -fPIE is enabled by default.
Tagging it stable so it is possible to compile recent stable kernels as
well.
Cc: stable@vger.kernel.org
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
scripts/gcc-x86_64-has-stack-protector.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/gcc-x86_64-has-stack-protector.sh b/scripts/gcc-x86_64-has-stack-protector.sh
index 973e8c141567..17867e723a51 100755
--- a/scripts/gcc-x86_64-has-stack-protector.sh
+++ b/scripts/gcc-x86_64-has-stack-protector.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-echo "int foo(void) { char X[200]; return 3; }" | $* -S -x c -c -O0 -mcmodel=kernel -fstack-protector - -o - 2> /dev/null | grep -q "%gs"
+echo "int foo(void) { char X[200]; return 3; }" | $* -S -x c -c -O0 -mcmodel=kernel -fno-PIE -fstack-protector - -o - 2> /dev/null | grep -q "%gs"
if [ "$?" -eq "0" ] ; then
echo y
else
--
2.10.2
next prev parent reply other threads:[~2016-11-04 18:39 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-04 18:39 -fno-PIE, take #3 Sebastian Andrzej Siewior
2016-11-04 18:39 ` [PATCH 1/3] kbuild: add -fno-PIE Sebastian Andrzej Siewior
2016-11-08 22:14 ` Michal Marek
2016-11-09 6:10 ` Ingo Molnar
2016-11-09 21:29 ` Michal Marek
2016-11-10 9:25 ` Ingo Molnar
2016-11-04 18:39 ` Sebastian Andrzej Siewior [this message]
2016-11-04 18:39 ` [PATCH 3/3] x86/kexec: " Sebastian Andrzej Siewior
2016-11-07 6:30 ` -fno-PIE, take #3 Theodore Ts'o
2016-11-07 22:31 ` H. Peter Anvin
2016-11-08 13:42 ` Borislav Petkov
2016-11-08 22:51 ` Ben Hutchings
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=20161104183940.30692-3-bigeasy@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=ahferroin7@gmail.com \
--cc=ben@decadent.org.uk \
--cc=bp@alien8.de \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mmarek@suse.com \
--cc=svenjoac@gmx.de \
--cc=viro@ZenIV.linux.org.uk \
--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;
as well as URLs for NNTP newsgroup(s).