diff mbox series

[4/4] um: prevent user code in modules

Message ID 20230210220511.7d1f0bac072e.Ie6305500df467812917a2db78c53b8fd3434e7d5@changeid
State Accepted
Headers show
Series [1/4] um: hostfs: define our own API boundary | expand

Commit Message

Johannes Berg Feb. 10, 2023, 9:05 p.m. UTC
From: Johannes Berg <johannes.berg@intel.com>

By not doing the user code cflags mangling we can simply
break the build for any user code sneaking into modules.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 arch/um/scripts/Makefile.rules | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/arch/um/scripts/Makefile.rules b/arch/um/scripts/Makefile.rules
index a4dfa7d7636e..a8b7d9dab0a6 100644
--- a/arch/um/scripts/Makefile.rules
+++ b/arch/um/scripts/Makefile.rules
@@ -4,8 +4,8 @@ 
 # ===========================================================================
 
 USER_SINGLE_OBJS := \
-	$(foreach f,$(patsubst %.o,%,$(obj-y) $(obj-m)),$($(f)-objs))
-USER_OBJS += $(filter %_user.o,$(obj-y) $(obj-m)  $(USER_SINGLE_OBJS))
+	$(foreach f,$(patsubst %.o,%,$(obj-y)),$($(f)-objs))
+USER_OBJS += $(filter %_user.o,$(obj-y) $(USER_SINGLE_OBJS))
 USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file))
 
 $(USER_OBJS:.o=.%): \