From 194cb4e96385a67b3f7eab26c91f65e857f9fe03 Mon Sep 17 00:00:00 2001 From: Borislav Petkov Date: Thu, 18 Feb 2021 06:15:08 +0000 Subject: [PATCH] x86/build: Disable CET instrumentation in the kernel for 32-bit too On Mon, Feb 08, 2021 at 10:19:33AM -0500, AC wrote: > That did fix it, thank you! Thanks! --- arch/x86/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 5857917f83eee..30920d70b48b3 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -50,6 +50,9 @@ export BITS KBUILD_CFLAGS += -mno-sse -mno-mmx -mno-sse2 -mno-3dnow KBUILD_CFLAGS += $(call cc-option,-mno-avx,) +# Intel CET isn't enabled in the kernel +KBUILD_CFLAGS += $(call cc-option,-fcf-protection=none) + ifeq ($(CONFIG_X86_32),y) BITS := 32 UTS_MACHINE := i386 @@ -120,9 +123,6 @@ else KBUILD_CFLAGS += -mno-red-zone KBUILD_CFLAGS += -mcmodel=kernel - - # Intel CET isn't enabled in the kernel - KBUILD_CFLAGS += $(call cc-option,-fcf-protection=none) endif ifdef CONFIG_X86_X32