Skip to content

Commit 41c1a06

Browse files
yshuiKAGA-KOKO
authored andcommitted
entry: Unbreak single step reporting behaviour
The move of TIF_SYSCALL_EMU to SYSCALL_WORK_SYSCALL_EMU broke single step reporting. The original code reported the single step when TIF_SINGLESTEP was set and TIF_SYSCALL_EMU was not set. The SYSCALL_WORK conversion got the logic wrong and now the reporting only happens when both bits are set. Restore the original behaviour. [ tglx: Massaged changelog and dropped the pointless double negation ] Fixes: 64eb35f ("ptrace: Migrate TIF_SYSCALL_EMU to use SYSCALL_WORK flag") Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Gabriel Krisman Bertazi <krisman@collabora.com> Link: https://lore.kernel.org/r/877do3gaq9.fsf@m5Zedd9JOGzJrf0
1 parent 13391c6 commit 41c1a06

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

kernel/entry/common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ static inline bool report_single_step(unsigned long work)
222222
*/
223223
static inline bool report_single_step(unsigned long work)
224224
{
225-
if (!(work & SYSCALL_WORK_SYSCALL_EMU))
225+
if (work & SYSCALL_WORK_SYSCALL_EMU)
226226
return false;
227227

228228
return !!(current_thread_info()->flags & _TIF_SINGLESTEP);

0 commit comments

Comments
 (0)