diff options
author | Sami Tolvanen | 2019-04-16 16:40:00 -0500 |
---|---|---|
committer | Sami Tolvanen | 2020-12-16 10:56:36 -0600 |
commit | 5fbc1d78a471f71bc537c9c152a5287f8973e5de (patch) | |
tree | 1e49c1b7e1b73338b060ccf2b88b5ad273cb3e83 | |
parent | 6dd43b98c28f4a2c9cde513995f8ff188fa060fd (diff) | |
download | kernel-5fbc1d78a471f71bc537c9c152a5287f8973e5de.tar.gz kernel-5fbc1d78a471f71bc537c9c152a5287f8973e5de.tar.xz kernel-5fbc1d78a471f71bc537c9c152a5287f8973e5de.zip |
FROMLIST: x86, vdso: disable LTO only for vDSO
Disable LTO for the vDSO. Note that while we could use Clang's LTO
for the 64-bit vDSO, it won't add noticeable benefit for the small
amount of C code.
Bug: 145210207
Change-Id: I97df448374c6ee44920c92db361551728562178a
Link: https://lore.kernel.org/lkml/20201013003203.4168817-24-samitolvanen@google.com/
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
-rw-r--r-- | arch/x86/entry/vdso/Makefile | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/entry/vdso/Makefile b/arch/x86/entry/vdso/Makefile index 21243747965d..b36f42965b62 100644 --- a/arch/x86/entry/vdso/Makefile +++ b/arch/x86/entry/vdso/Makefile | |||
@@ -90,7 +90,7 @@ ifneq ($(RETPOLINE_VDSO_CFLAGS),) | |||
90 | endif | 90 | endif |
91 | endif | 91 | endif |
92 | 92 | ||
93 | $(vobjs): KBUILD_CFLAGS := $(filter-out $(GCC_PLUGINS_CFLAGS) $(RETPOLINE_CFLAGS),$(KBUILD_CFLAGS)) $(CFL) | 93 | $(vobjs): KBUILD_CFLAGS := $(filter-out $(CC_FLAGS_LTO) $(GCC_PLUGINS_CFLAGS) $(RETPOLINE_CFLAGS),$(KBUILD_CFLAGS)) $(CFL) |
94 | 94 | ||
95 | # | 95 | # |
96 | # vDSO code runs in userspace and -pg doesn't help with profiling anyway. | 96 | # vDSO code runs in userspace and -pg doesn't help with profiling anyway. |
@@ -148,6 +148,7 @@ KBUILD_CFLAGS_32 := $(filter-out -fno-pic,$(KBUILD_CFLAGS_32)) | |||
148 | KBUILD_CFLAGS_32 := $(filter-out -mfentry,$(KBUILD_CFLAGS_32)) | 148 | KBUILD_CFLAGS_32 := $(filter-out -mfentry,$(KBUILD_CFLAGS_32)) |
149 | KBUILD_CFLAGS_32 := $(filter-out $(GCC_PLUGINS_CFLAGS),$(KBUILD_CFLAGS_32)) | 149 | KBUILD_CFLAGS_32 := $(filter-out $(GCC_PLUGINS_CFLAGS),$(KBUILD_CFLAGS_32)) |
150 | KBUILD_CFLAGS_32 := $(filter-out $(RETPOLINE_CFLAGS),$(KBUILD_CFLAGS_32)) | 150 | KBUILD_CFLAGS_32 := $(filter-out $(RETPOLINE_CFLAGS),$(KBUILD_CFLAGS_32)) |
151 | KBUILD_CFLAGS_32 := $(filter-out $(CC_FLAGS_LTO),$(KBUILD_CFLAGS_32)) | ||
151 | KBUILD_CFLAGS_32 += -m32 -msoft-float -mregparm=0 -fpic | 152 | KBUILD_CFLAGS_32 += -m32 -msoft-float -mregparm=0 -fpic |
152 | KBUILD_CFLAGS_32 += -fno-stack-protector | 153 | KBUILD_CFLAGS_32 += -fno-stack-protector |
153 | KBUILD_CFLAGS_32 += $(call cc-option, -foptimize-sibling-calls) | 154 | KBUILD_CFLAGS_32 += $(call cc-option, -foptimize-sibling-calls) |