All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] audit: Force audit_context() to be always inlined
@ 2026-07-21  4:01 Jinjie Ruan
  2026-07-21  7:59 ` Thomas Gleixner
  0 siblings, 1 reply; 2+ messages in thread
From: Jinjie Ruan @ 2026-07-21  4:01 UTC (permalink / raw)
  To: paul, eparis, tglx, audit, linux-kernel; +Cc: ruanjinjie

commit 6f25517010dd ("entry: Rework syscall_audit_enter()") relies on
dead code elimination to remove the call to syscall_enter_audit() when
CONFIG_AUDITSYSCALL is disabled. However, with s390 GCC 13.4.0 +
CONFIG_KASAN, audit_context() is not inlined despite being marked
inline, causing an undefined reference to syscall_enter_audit().

Force audit_context() to be __always_inline to ensure the conditional
can be constant-folded and dead code elimination works correctly.

Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Suggested-by: Thomas Gleixner <tglx@kernel.org>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202607181530.2nx8zb3J-lkp@intel.com/
---
 include/linux/audit.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/audit.h b/include/linux/audit.h
index 45abb3722d30..d79df1b75e74 100644
--- a/include/linux/audit.h
+++ b/include/linux/audit.h
@@ -343,7 +343,7 @@ static inline void audit_set_context(struct task_struct *task, struct audit_cont
 	task->audit_context = ctx;
 }
 
-static inline struct audit_context *audit_context(void)
+static __always_inline struct audit_context *audit_context(void)
 {
 	return current->audit_context;
 }
@@ -623,7 +623,7 @@ static inline bool audit_dummy_context(void)
 }
 static inline void audit_set_context(struct task_struct *task, struct audit_context *ctx)
 { }
-static inline struct audit_context *audit_context(void)
+static __always_inline struct audit_context *audit_context(void)
 {
 	return NULL;
 }
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-07-21  7:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-21  4:01 [PATCH v2] audit: Force audit_context() to be always inlined Jinjie Ruan
2026-07-21  7:59 ` Thomas Gleixner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.