From a16ea85f69add532e532bfafbf12d1c79c559fa2 Mon Sep 17 00:00:00 2001 From: Sid Nayyar Date: Thu, 30 Jan 2025 11:13:33 -0800 Subject: [PATCH] ANDROID: enable protected-exports.c generation in modpost Enable export protection when CONFIG_MODULE_SIG_PROTECT_LIST is set. Bug: 393366754 Change-Id: Ic31070d195c9cec2ef6feaa28e2cd0f7f36122db Signed-off-by: Sid Nayyar --- scripts/Makefile.modpost | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost index 6c309d39ab6c..e3c81ea45f6c 100644 --- a/scripts/Makefile.modpost +++ b/scripts/Makefile.modpost @@ -198,6 +198,13 @@ modpost-args += -e $(addprefix -i , $(KBUILD_EXTRA_SYMBOLS)) endif # ($(KBUILD_EXTMOD),) +ifdef CONFIG_MODULE_SIG_PROTECT +mod-protect-list := $(CONFIG_MODULE_SIG_PROTECT_LIST) +mod-protect-list := $(if $(filter-out /%, $(mod-protect-list)),$(if $(wildcard $(mod-protect-list)),,$(srctree)/))$(mod-protect-list) +modpost-args += $(addprefix -p , $(mod-protect-list)) +modpost-deps += $(mod-protect-list) +endif + quiet_cmd_modpost = MODPOST $@ cmd_modpost = \ $(if $(missing-input), \