• Sven Schnelle's avatar
    parisc/entry: fix trace test in syscall exit path · 3ec18fc7
    Sven Schnelle authored
    commit 8779e05b ("parisc: Fix ptrace check on syscall return")
    fixed testing of TI_FLAGS. This uncovered a bug in the test mask.
    syscall_restore_rfi is only used when the kernel needs to exit to
    usespace with single or block stepping and the recovery counter
    enabled. The test however used _TIF_SYSCALL_TRACE_MASK, which
    includes a lot of bits that shouldn't be tested here.
    
    Fix this by using TIF_SINGLESTEP and TIF_BLOCKSTEP directly.
    
    I encountered this bug by enabling syscall tracepoints. Both in qemu and
    on real hardware. As soon as i enabled the tracepoint (sys_exit_read,
    but i guess it doesn't really matter which one), i got random page
    faults in userspace almost immediately.
    Signed-off-by: default avatarSven Schnelle <svens@stackframe.org>
    Signed-off-by: default avatarHelge Deller <deller@gmx.de>
    3ec18fc7
entry.S 55.7 KB