diff options
| author | Maxime Ripard <maxime@cerno.tech> | 2020-09-14 18:11:40 +0200 |
|---|---|---|
| committer | Maxime Ripard <maxime@cerno.tech> | 2020-09-14 18:11:40 +0200 |
| commit | 00af6729b52ede86a08173c8d5f2c8cd9fa3390d (patch) | |
| tree | 6a8cec3575d5cd49fffadb372b85da5475a266b0 /kernel/entry | |
| parent | da62cb7230f0871c30dc9789071f63229158d261 (diff) | |
| parent | 818280d5adf1d80e78f95821815148abe9407e14 (diff) | |
Merge drm/drm-next into drm-misc-next
Paul Cercueil needs some patches in -rc5 to apply new patches for ingenic
properly.
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Diffstat (limited to 'kernel/entry')
| -rw-r--r-- | kernel/entry/common.c | 38 |
1 files changed, 31 insertions, 7 deletions
diff --git a/kernel/entry/common.c b/kernel/entry/common.c index 9852e0d62d95..18683598edbc 100644 --- a/kernel/entry/common.c +++ b/kernel/entry/common.c @@ -65,25 +65,49 @@ static long syscall_trace_enter(struct pt_regs *regs, long syscall, syscall_enter_audit(regs, syscall); - return ret ? : syscall; + /* The above might have changed the syscall number */ + return ret ? : syscall_get_nr(current, regs); } -noinstr long syscall_enter_from_user_mode(struct pt_regs *regs, long syscall) +static __always_inline long +__syscall_enter_from_user_work(struct pt_regs *regs, long syscall) { unsigned long ti_work; - enter_from_user_mode(regs); - instrumentation_begin(); - - local_irq_enable(); ti_work = READ_ONCE(current_thread_info()->flags); if (ti_work & SYSCALL_ENTER_WORK) syscall = syscall_trace_enter(regs, syscall, ti_work); - instrumentation_end(); 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); + instrumentation_begin(); + local_irq_enable(); + instrumentation_end(); +} + /** * exit_to_user_mode - Fixup state when exiting to user mode * |
