mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-12 21:44:06 +08:00
58ac3154b8
Some builds of GCC enable stack protector by default. Simply removing
the arguments is not sufficient to disable stack protector, as the stack
protector for those GCC builds must be explicitly disabled. Remove the
argument removals and add -fno-stack-protector. Additionally include
missed x32 argument updates, and adjust whitespace for readability.
Fixes: 20355e5f73
("x86/entry: Exclude low level entry code from sanitizing")
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/202006261333.585319CA6B@keescook
33 lines
936 B
Makefile
33 lines
936 B
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
#
|
|
# Makefile for the x86 low level entry code
|
|
#
|
|
|
|
KASAN_SANITIZE := n
|
|
UBSAN_SANITIZE := n
|
|
KCOV_INSTRUMENT := n
|
|
|
|
CFLAGS_REMOVE_common.o = $(CC_FLAGS_FTRACE)
|
|
CFLAGS_REMOVE_syscall_64.o = $(CC_FLAGS_FTRACE)
|
|
CFLAGS_REMOVE_syscall_32.o = $(CC_FLAGS_FTRACE)
|
|
CFLAGS_REMOVE_syscall_x32.o = $(CC_FLAGS_FTRACE)
|
|
|
|
CFLAGS_common.o += -fno-stack-protector
|
|
CFLAGS_syscall_64.o += -fno-stack-protector
|
|
CFLAGS_syscall_32.o += -fno-stack-protector
|
|
CFLAGS_syscall_x32.o += -fno-stack-protector
|
|
|
|
CFLAGS_syscall_64.o += $(call cc-option,-Wno-override-init,)
|
|
CFLAGS_syscall_32.o += $(call cc-option,-Wno-override-init,)
|
|
CFLAGS_syscall_x32.o += $(call cc-option,-Wno-override-init,)
|
|
|
|
obj-y := entry_$(BITS).o thunk_$(BITS).o syscall_$(BITS).o
|
|
obj-y += common.o
|
|
|
|
obj-y += vdso/
|
|
obj-y += vsyscall/
|
|
|
|
obj-$(CONFIG_IA32_EMULATION) += entry_64_compat.o syscall_32.o
|
|
obj-$(CONFIG_X86_X32_ABI) += syscall_x32.o
|
|
|