linux/arch
Sven Schnelle 3ec18fc783 parisc/entry: fix trace test in syscall exit path
commit 8779e05ba8 ("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: Sven Schnelle <svens@stackframe.org>
Signed-off-by: Helge Deller <deller@gmx.de>
2021-11-13 22:10:56 +01:00
..
alpha Merge branch 'akpm' (patches from Andrew) 2021-11-09 10:11:53 -08:00
arc Merge branch 'exit-cleanups-for-v5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2021-11-10 16:15:54 -08:00
arm arm64 fixes for -rc1 2021-11-10 11:29:30 -08:00
arm64 New x86 features: 2021-11-13 10:01:10 -08:00
csky asm-generic: asm/syscall.h cleanup 2021-11-10 11:22:03 -08:00
h8300 Kbuild updates for v5.16 2021-11-08 09:15:45 -08:00
hexagon
ia64 asm-generic: asm/syscall.h cleanup 2021-11-10 11:22:03 -08:00
m68k Fixes include: 2021-11-11 14:22:05 -08:00
microblaze asm-generic: asm/syscall.h cleanup 2021-11-10 11:22:03 -08:00
mips - Config updates for BMIPS platform 2021-11-13 09:11:33 -08:00
nds32 Merge branch 'exit-cleanups-for-v5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2021-11-10 16:15:54 -08:00
nios2 asm-generic: asm/syscall.h cleanup 2021-11-10 11:22:03 -08:00
openrisc Merge branch 'exit-cleanups-for-v5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2021-11-10 16:15:54 -08:00
parisc parisc/entry: fix trace test in syscall exit path 2021-11-13 22:10:56 +01:00
powerpc mm/migrate.c: remove MIGRATE_PFN_LOCKED 2021-11-11 09:34:35 -08:00
riscv RISC-V Patches for the 5.16 Merge Window, Part 1 2021-11-13 09:15:42 -08:00
s390 s390 updates for the 5.16 merge window #2 2021-11-13 09:18:06 -08:00
sh Merge branch 'exit-cleanups-for-v5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2021-11-10 16:15:54 -08:00
sparc Merge branch 'exit-cleanups-for-v5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2021-11-10 16:15:54 -08:00
um Merge branch 'exit-cleanups-for-v5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2021-11-10 16:15:54 -08:00
x86 New x86 features: 2021-11-13 10:01:10 -08:00
xtensa Merge branch 'exit-cleanups-for-v5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2021-11-10 16:15:54 -08:00
.gitignore
Kconfig Tracing updates for 5.16: 2021-11-01 20:05:19 -07:00