Re: [PATCH V2 02/41] x86/traps: Remove stack-protector from traps.c

From: Borislav Petkov
Date: Mon Sep 27 2021 - 06:19:13 EST


On Sun, Sep 26, 2021 at 11:07:59PM +0800, Lai Jiangshan wrote:
> diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
> index 8f4e8fa6ed75..0e054e2304c6 100644
> --- a/arch/x86/kernel/Makefile
> +++ b/arch/x86/kernel/Makefile
> @@ -48,6 +48,9 @@ KCOV_INSTRUMENT := n
>
> CFLAGS_head$(BITS).o += -fno-stack-protector
>
> +CFLAGS_REMOVE_traps.o = -fstack-protector -fstack-protector-strong

Why this too?

> +CFLAGS_traps.o += -fno-stack-protector

Isn't this enough to disable stack protector for this file?

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette