OpenCloudOS-Kernel/arch/parisc/kernel
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
..
syscalls compat: remove some compat entry points 2021-09-08 15:32:35 -07:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
Makefile parisc: add support for TOC (transfer of control) 2021-11-01 07:35:59 +01:00
alternative.c parisc: Refactor alternative code to accept multiple conditions 2020-04-05 22:50:40 +02:00
asm-offsets.c parisc: move CPU field back into thread_info 2021-11-04 11:21:47 +01:00
audit.c audit: add support for the openat2 syscall 2021-10-01 16:52:48 -04:00
cache.c parisc: Flush kernel data mapping in set_pte_at() when installing pte for user page 2021-11-13 22:10:56 +01:00
compat_audit.c audit: add support for the openat2 syscall 2021-10-01 16:52:48 -04:00
drivers.c bus: Make remove callback return void 2021-07-21 11:53:42 +02:00
entry.S parisc/entry: fix trace test in syscall exit path 2021-11-13 22:10:56 +01:00
firmware.c parisc/firmware: add functions to retrieve TOC data 2021-11-01 07:35:59 +01:00
ftrace.c Tracing updates for 5.16: 2021-11-01 20:05:19 -07:00
hardware.c parisc: hardware: Update references to parisc website 2020-06-01 23:02:39 +02:00
head.S parisc: Move thread_info into task struct 2021-11-01 07:35:59 +01:00
hpmc.S parisc: Fix IVT checksum calculation wrt HPMC 2021-02-12 16:31:42 +01:00
inventory.c parisc: Add qemu fw_cfg interface 2020-10-15 08:10:37 +02:00
irq.c parisc: Move thread_info into task struct 2021-11-01 07:35:59 +01:00
jump_label.c parisc: Add static branch and JUMP_LABEL feature 2019-05-06 00:10:03 +02:00
kexec.c parisc: add support for kexec_file_load() syscall 2019-09-08 15:41:46 +02:00
kexec_file.c parisc: add support for kexec_file_load() syscall 2019-09-08 15:41:46 +02:00
kgdb.c maccess: rename probe_kernel_{read,write} to copy_{from,to}_kernel_nofault 2020-06-17 10:57:41 -07:00
kprobes.c kprobes: treewide: Make it harder to refer kretprobe_trampoline directly 2021-09-30 21:24:06 -04:00
module.c mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
pa7300lc.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pacache.S mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
parisc_ksyms.c parisc: Drop strnlen_user() in favour of generic version 2021-09-09 12:44:30 +02:00
patch.c parisc: add spinlock to patch function 2019-06-08 12:56:26 +02:00
pci-dma.c parisc: pci-dma: fix warning unused-function 2020-12-15 05:41:11 +01:00
pci.c parisc: Drop comments which are already in pci.h 2019-09-05 16:41:11 +02:00
pdc_chassis.c kernel.h: split out panic and oops helpers 2021-07-01 11:06:04 -07:00
pdc_cons.c tty: pdc_cons, free tty_driver upon failure 2021-07-27 12:17:21 +02:00
pdt.c parisc: Make use of the helper macro kthread_run() 2021-11-01 07:36:01 +01:00
perf.c parisc/perf: open access for CAP_PERFMON privileged process 2020-04-16 12:19:08 -03:00
perf_asm.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
perf_images.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
process.c parisc architecture updates for kernel v5.16-rc1 2021-11-01 16:51:13 -07:00
processor.c parisc: Drop loops_per_jiffy from per_cpu struct 2020-11-11 14:57:30 +01:00
ptrace.c arch/parisc/kernel: remove duplicate include in ptrace 2021-03-04 09:12:29 +01:00
real2.S parisc: Fix and improve kernel stack unwinding 2018-08-13 09:54:17 +02:00
relocate_kernel.S parisc: add kexec syscall support 2019-09-08 15:37:04 +02:00
setup.c parisc: Mark sched_clock unstable only if clocks are not syncronized 2021-09-09 12:44:31 +02:00
signal.c parisc: Reduce sigreturn trampoline to 3 instructions 2021-09-09 12:44:31 +02:00
signal32.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
signal32.h parisc: Reduce sigreturn trampoline to 3 instructions 2021-09-09 12:44:31 +02:00
smp.c parisc: move CPU field back into thread_info 2021-11-04 11:21:47 +01:00
stacktrace.c parisc: Fix implicit declaration of function '__kernel_text_address' 2021-11-13 22:10:56 +01:00
sys_parisc.c parisc: enhance warning regarding usage of O_NONBLOCK 2021-11-01 07:36:00 +01:00
sys_parisc32.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
syscall.S parisc: Don't disable interrupts in cmpxchg and futex operations 2021-11-04 11:21:20 +01:00
time.c parisc: Mark sched_clock unstable only if clocks are not syncronized 2021-09-09 12:44:31 +02:00
toc.c parisc: add support for TOC (transfer of control) 2021-11-01 07:35:59 +01:00
toc_asm.S parisc: add support for TOC (transfer of control) 2021-11-01 07:35:59 +01:00
topology.c parisc: Add CPU topology support 2017-11-17 15:27:22 +01:00
traps.c parisc: don't enable irqs unconditionally in handle_interruption() 2021-11-04 11:21:20 +01:00
unaligned.c Merge branch 'siginfo-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2019-07-08 21:48:15 -07:00
unwind.c parisc: Move thread_info into task struct 2021-11-01 07:35:59 +01:00
vmlinux.lds.S parisc: Fix backtrace to always include init funtion names 2021-11-13 22:10:56 +01:00