diff options
Diffstat (limited to 'arch/x86/entry/common.c')
-rw-r--r-- | arch/x86/entry/common.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/arch/x86/entry/common.c b/arch/x86/entry/common.c index 2418804e66b4..536b574b6161 100644 --- a/arch/x86/entry/common.c +++ b/arch/x86/entry/common.c | |||
@@ -72,23 +72,18 @@ static long syscall_trace_enter(struct pt_regs *regs) | |||
72 | 72 | ||
73 | struct thread_info *ti = current_thread_info(); | 73 | struct thread_info *ti = current_thread_info(); |
74 | unsigned long ret = 0; | 74 | unsigned long ret = 0; |
75 | bool emulated = false; | ||
76 | u32 work; | 75 | u32 work; |
77 | 76 | ||
78 | if (IS_ENABLED(CONFIG_DEBUG_ENTRY)) | 77 | if (IS_ENABLED(CONFIG_DEBUG_ENTRY)) |
79 | BUG_ON(regs != task_pt_regs(current)); | 78 | BUG_ON(regs != task_pt_regs(current)); |
80 | 79 | ||
81 | work = READ_ONCE(ti->flags) & _TIF_WORK_SYSCALL_ENTRY; | 80 | work = READ_ONCE(ti->flags); |
82 | 81 | ||
83 | if (unlikely(work & _TIF_SYSCALL_EMU)) | 82 | if (work & (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_EMU)) { |
84 | emulated = true; | 83 | ret = tracehook_report_syscall_entry(regs); |
85 | 84 | if (ret || (work & _TIF_SYSCALL_EMU)) | |
86 | if ((emulated || (work & _TIF_SYSCALL_TRACE)) && | 85 | return -1L; |
87 | tracehook_report_syscall_entry(regs)) | 86 | } |
88 | return -1L; | ||
89 | |||
90 | if (emulated) | ||
91 | return -1L; | ||
92 | 87 | ||
93 | #ifdef CONFIG_SECCOMP | 88 | #ifdef CONFIG_SECCOMP |
94 | /* | 89 | /* |