diff mbox series

[24/74] backport: fix __CFI_ADDRESSABLE use

Message ID 20240524190907.c464b76f129d.I69530605b67444170edc2f42589f31b8fb89b3f0@changeid (mailing list archive)
State New, archived
Headers show
Series backport updates from Intel | expand

Commit Message

Johannes Berg May 24, 2024, 5:07 p.m. UTC
From: Gregory Greenman <gregory.greenman@intel.com>

In later kernels, __CFI_ADDRESSABLE became just ___ADDRESSABLE,
but we still use __CFI_ADDRESSABLE. Since it's easier this way,
keep using __CFI_ADDRESSABLE but make it ___ADDRESSABLE if that
exists.

This fixes the issue that we get warnings about missing endbr:

  traps: Missing ENDBR: __exit_compat+0x0/0x20 [module name]

Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 backport/backport-include/linux/module.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/backport/backport-include/linux/module.h b/backport/backport-include/linux/module.h
index b93a56d97611..8269238c2cd4 100644
--- a/backport/backport-include/linux/module.h
+++ b/backport/backport-include/linux/module.h
@@ -3,8 +3,11 @@ 
 #include_next <linux/module.h>
 #include <linux/rcupdate.h>
 
+#ifndef ___ADDRESSABLE
+#define ___ADDRESSABLE(fn, __attr)
+#endif
 #ifndef __CFI_ADDRESSABLE
-#define __CFI_ADDRESSABLE(fn, __attr)
+#define __CFI_ADDRESSABLE(fn, __attr) ___ADDRESSABLE(fn, __attr)
 #endif
 
 /*