+ x86-fix-cc1-options-to-disable-fpie-when-compiling-with-config_cc_stackprotector=y.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     x86: fix cc1 options to disable -fPIE when compiling with CONFIG_CC_STACKPROTECTOR=y
has been added to the -mm tree.  Its filename is
     x86-fix-cc1-options-to-disable-fpie-when-compiling-with-config_cc_stackprotector=y.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: x86: fix cc1 options to disable -fPIE when compiling with CONFIG_CC_STACKPROTECTOR=y
From: Anthony G. Basile <basile@xxxxxxxxxxxxxxxxxx>

The arch/x86/Makefile uses scripts/gcc-x86_$(BITS)-has-stack-protector.sh
to check if cc1 supports -fstack-protector.  When -fPIE is passed to cc1,
these scripts fail causing stack protection to be disabled even when it
is available.

This fix is similar to commit c47efe5548abbf ("kbuild: fix cc1 options
check to ensure we do not use -fPIC when compiling").

Reported-by: Kai Dietrich <mail@xxxxxxxxx>
Signed-off-by: Magnus Granberg <zorry@xxxxxxxxxx>
Signed-off-by: Anthony G. Basile <basile@xxxxxxxxxxxxxxxxxx>
Cc: Jory A. Pratt <anarchy@xxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: "H. Peter Anvin" <hpa@xxxxxxxxx>
Cc: Michal Marek <mmarek@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 arch/x86/Makefile |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN arch/x86/Makefile~x86-fix-cc1-options-to-disable-fpie-when-compiling-with-config_cc_stackprotector=y arch/x86/Makefile
--- a/arch/x86/Makefile~x86-fix-cc1-options-to-disable-fpie-when-compiling-with-config_cc_stackprotector=y
+++ a/arch/x86/Makefile
@@ -74,7 +74,7 @@ endif
 
 ifdef CONFIG_CC_STACKPROTECTOR
 	cc_has_sp := $(srctree)/scripts/gcc-x86_$(BITS)-has-stack-protector.sh
-        ifeq ($(shell $(CONFIG_SHELL) $(cc_has_sp) $(CC) $(biarch)),y)
+        ifeq ($(shell $(CONFIG_SHELL) $(cc_has_sp) $(CC) $(KBUILD_CPPFLAGS) $(biarch)),y)
                 stackp-y := -fstack-protector
                 KBUILD_CFLAGS += $(stackp-y)
         else
_

Patches currently in -mm which might be from basile@xxxxxxxxxxxxxxxxxx are

x86-fix-cc1-options-to-disable-fpie-when-compiling-with-config_cc_stackprotector=y.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux