From 76e95699457d92125af12e04b317cadd3c7d650d Mon Sep 17 00:00:00 2001 From: Alice Ryhl Date: Mon, 9 Sep 2024 10:38:12 +0000 Subject: [PATCH] Revert "FROMLIST: rust: add flags for shadow call stack sanitizer" This reverts commit 263770649df83141b55bbb9b154e41de7b9ce9dc. A newer version of this patchset will land in 6.12-rc1. Revert the old version now to avoid merge conflicts in the 6.12-rc1 merge. Removing these flags could result in miscompilation in Rust+SCS builds, however commit f126745da817 ("rust: SHADOW_CALL_STACK is incompatible with Rust") has already landed through 6.11-rc2, so such builds are rejected by Kconfig. Change-Id: Id0ea2372811159c67c1afd7e4fed525848c21f8b Signed-off-by: Alice Ryhl --- Makefile | 1 - arch/arm64/Makefile | 4 ---- 2 files changed, 5 deletions(-) diff --git a/Makefile b/Makefile index b1963620e5a3..ea89474032f4 100644 --- a/Makefile +++ b/Makefile @@ -948,7 +948,6 @@ ifdef CONFIG_SHADOW_CALL_STACK ifndef CONFIG_DYNAMIC_SCS CC_FLAGS_SCS := -fsanitize=shadow-call-stack KBUILD_CFLAGS += $(CC_FLAGS_SCS) -KBUILD_RUSTFLAGS += -Zsanitizer=shadow-call-stack endif export CC_FLAGS_SCS endif diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile index 05a60ec6b222..ec659634eb1e 100644 --- a/arch/arm64/Makefile +++ b/arch/arm64/Makefile @@ -57,12 +57,9 @@ KBUILD_AFLAGS += $(call cc-option,-mabi=lp64) ifneq ($(CONFIG_UNWIND_TABLES),y) KBUILD_CFLAGS += -fno-asynchronous-unwind-tables -fno-unwind-tables KBUILD_AFLAGS += -fno-asynchronous-unwind-tables -fno-unwind-tables -KBUILD_RUSTFLAGS += -Cforce-unwind-tables=n else KBUILD_CFLAGS += -fasynchronous-unwind-tables KBUILD_AFLAGS += -fasynchronous-unwind-tables -# TODO: Pass -Zuse-sync-unwind=n once we upgrade to Rust 1.77.0 -KBUILD_RUSTFLAGS += -Cforce-unwind-tables=y endif ifeq ($(CONFIG_STACKPROTECTOR_PER_TASK),y) @@ -117,7 +114,6 @@ endif ifeq ($(CONFIG_SHADOW_CALL_STACK), y) KBUILD_CFLAGS += -ffixed-x18 -KBUILD_RUSTFLAGS += -Ctarget-feature=+reserve-x18 endif ifeq ($(CONFIG_CPU_BIG_ENDIAN), y)