diff options
author | Sven Schnelle <svens@linux.ibm.com> | 2023-12-18 08:45:20 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2023-12-21 23:12:18 +0100 |
commit | 221a164035fd8b554a44bd7c4bf8e7715a497561 (patch) | |
tree | c0e5098d4ebf7ed3cae0d2245ce3b6c4daa56f1f /kernel/entry | |
parent | caf4062e35b21cd7d3d35ac2f58f9765d02d32a0 (diff) | |
download | linux-221a164035fd8b554a44bd7c4bf8e7715a497561.tar.gz linux-221a164035fd8b554a44bd7c4bf8e7715a497561.tar.bz2 linux-221a164035fd8b554a44bd7c4bf8e7715a497561.zip |
entry: Move syscall_enter_from_user_mode() to header file
To allow inlining of syscall_enter_from_user_mode(), move it
to entry-common.h.
Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20231218074520.1998026-4-svens@linux.ibm.com
Diffstat (limited to 'kernel/entry')
-rw-r--r-- | kernel/entry/common.c | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/kernel/entry/common.c b/kernel/entry/common.c index 0616f239da4b..88cb3c88aaa5 100644 --- a/kernel/entry/common.c +++ b/kernel/entry/common.c @@ -25,7 +25,7 @@ static inline void syscall_enter_audit(struct pt_regs *regs, long syscall) } } -static long syscall_trace_enter(struct pt_regs *regs, long syscall, +long syscall_trace_enter(struct pt_regs *regs, long syscall, unsigned long work) { long ret = 0; @@ -65,36 +65,6 @@ static long syscall_trace_enter(struct pt_regs *regs, long syscall, return ret ? : syscall; } -static __always_inline long -__syscall_enter_from_user_work(struct pt_regs *regs, long syscall) -{ - unsigned long work = READ_ONCE(current_thread_info()->syscall_work); - - if (work & SYSCALL_WORK_ENTER) - syscall = syscall_trace_enter(regs, syscall, work); - - return syscall; -} - -long syscall_enter_from_user_mode_work(struct pt_regs *regs, long syscall) -{ - return __syscall_enter_from_user_work(regs, syscall); -} - -noinstr long syscall_enter_from_user_mode(struct pt_regs *regs, long syscall) -{ - long ret; - - enter_from_user_mode(regs); - - instrumentation_begin(); - local_irq_enable(); - ret = __syscall_enter_from_user_work(regs, syscall); - instrumentation_end(); - - return ret; -} - noinstr void syscall_enter_from_user_mode_prepare(struct pt_regs *regs) { enter_from_user_mode(regs); |