[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250712192202.707192-15-gatlin.newhouse@gmail.com>
Date: Sat, 12 Jul 2025 19:21:59 +0000
From: Gatlin Newhouse <gatlin.newhouse@...il.com>
To: linux-hardening@...r.kernel.org
Cc: Gatlin Newhouse <gatlin.newhouse@...il.com>
Subject: [RFC v1 14/17] makefile: add SafeFetch support to makefiles
Also update version string for differentiating testing kernels from
host kernels.
---
Makefile | 3 ++-
mm/Makefile | 1 +
scripts/Makefile.lib | 4 ++++
3 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 7eea2a41c905..6a3bf5849270 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@
VERSION = 6
PATCHLEVEL = 16
SUBLEVEL = 0
-EXTRAVERSION = -rc5
+EXTRAVERSION = -rc5-safefetch
NAME = Baby Opossum Posse
# *DOCUMENTATION*
@@ -1088,6 +1088,7 @@ include-$(CONFIG_KCOV) += scripts/Makefile.kcov
include-$(CONFIG_RANDSTRUCT) += scripts/Makefile.randstruct
include-$(CONFIG_AUTOFDO_CLANG) += scripts/Makefile.autofdo
include-$(CONFIG_PROPELLER_CLANG) += scripts/Makefile.propeller
+include-$(CONFIG_SAFEFETCH) += scripts/Makefile.safefetch
include-$(CONFIG_GCC_PLUGINS) += scripts/Makefile.gcc-plugins
include $(addprefix $(srctree)/, $(include-y))
diff --git a/mm/Makefile b/mm/Makefile
index 1a7a11d4933d..36826aaea1c2 100644
--- a/mm/Makefile
+++ b/mm/Makefile
@@ -92,6 +92,7 @@ obj-$(CONFIG_PAGE_POISONING) += page_poison.o
obj-$(CONFIG_KASAN) += kasan/
obj-$(CONFIG_KFENCE) += kfence/
obj-$(CONFIG_KMSAN) += kmsan/
+obj-$(CONFIG_SAFEFETCH) += safefetch/
obj-$(CONFIG_FAILSLAB) += failslab.o
obj-$(CONFIG_FAIL_PAGE_ALLOC) += fail_page_alloc.o
obj-$(CONFIG_MEMTEST) += memtest.o
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 1d581ba5df66..d227eed3c6ed 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -90,6 +90,10 @@ _rust_flags += $(if $(patsubst n%,, \
$(RUSTFLAGS_KCOV))
endif
+ifeq ($(CONFIG_SAFEFETCH),y)
+_c_flags += $(CFLAGS_SAFEFETCH)
+endif
+
#
# Enable KCSAN flags except some files or directories we don't want to check
# (depends on variables KCSAN_SANITIZE_obj.o, KCSAN_SANITIZE)
--
2.25.1
Powered by blists - more mailing lists