Skip to content

Commit

Permalink
entry: Unbreak single step reporting behaviour
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Reviewed-by: Gabriel Krisman Bertazi <[email protected]>
Link: https://lore.kernel.org/r/877do3gaq9.fsf@m5Zedd9JOGzJrf0
  • Loading branch information
yshui authored and KAGA-KOKO committed Jan 28, 2021
1 parent 13391c6 commit 41c1a06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/entry/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ static inline bool report_single_step(unsigned long work)
*/
static inline bool report_single_step(unsigned long work)
{
if (!(work & SYSCALL_WORK_SYSCALL_EMU))
if (work & SYSCALL_WORK_SYSCALL_EMU)
return false;

return !!(current_thread_info()->flags & _TIF_SINGLESTEP);
Expand Down

0 comments on commit 41c1a06

Please sign in to comment.