linux-stable/arch/parisc
John David Anglin b3ea76bda7 parisc: Fix handling off probe non-access faults
[ Upstream commit e00b0a2ab8 ]

Currently, the parisc kernel does not fully support non-access TLB
fault handling for probe instructions. In the fast path, we set the
target register to zero if it is not a shadowed register. The slow
path is not implemented, so we call do_page_fault. The architecture
indicates that non-access faults should not cause a page fault from
disk.

This change adds to code to provide non-access fault support for
probe instructions. It also modifies the handling of faults on
userspace so that if the address lies in a valid VMA and the access
type matches that for the VMA, the probe target register is set to
one. Otherwise, the target register is set to zero.

This was done to make probe instructions more useful for userspace.
Probe instructions are not very useful if they set the target register
to zero whenever a page is not present in memory. Nominally, the
purpose of the probe instruction is determine whether read or write
access to a given address is allowed.

This fixes a problem in function pointer comparison noticed in the
glibc testsuite (stdio-common/tst-vfprintf-user-type). The same
problem is likely in glibc (_dl_lookup_address).

V2 adds flush and lpa instruction support to handle_nadtlb_fault.

Signed-off-by: John David Anglin <dave.anglin@bell.net>
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-04-08 14:23:56 +02:00
..
boot parisc: Add missing FORCE prerequisite in Makefile 2021-09-09 12:44:30 +02:00
configs configs: remove the obsolete CONFIG_INPUT_POLLDEV 2021-09-08 11:50:28 -07:00
include parisc: Fix handling off probe non-access faults 2022-04-08 14:23:56 +02:00
kernel parisc: Fix handling off probe non-access faults 2022-04-08 14:23:56 +02:00
lib parisc: Add ioread64_lo_hi() and iowrite64_lo_hi() 2022-02-23 12:03:04 +01:00
math-emu parisc: math-emu: Fix fall-through warnings 2021-09-01 22:18:18 +02:00
mm parisc: Fix handling off probe non-access faults 2022-04-08 14:23:56 +02:00
defpalo.conf
install.sh parisc: Fix "make install" on newer debian releases 2021-12-08 09:04:55 +01:00
Kbuild parisc: move core-y in arch/parisc/Makefile to arch/parisc/Kbuild 2021-08-30 10:18:25 +02:00
Kconfig firmware: include drivers/firmware/Kconfig unconditionally 2021-10-07 16:51:26 +02:00
Kconfig.debug tracing: Refactor TRACE_IRQFLAGS_SUPPORT in Kconfig 2021-08-16 11:37:21 -04:00
Makefile parisc: Fix KBUILD_IMAGE for self-extracting kernel 2021-12-08 09:04:55 +01:00
nm