qemu-e2k/target
Helge Deller 6fab0c182d target/hppa: Fix proberi instruction emulation for linux-user
The proberi assembler instruction checks the read/write access rights
for the page of a given address and shall return a value of 1 if the
test succeeds and a value of 0 on failure in the target register.

But when run in linux-user mode, qemu currently simply returns the
return code of page_check_range() which returns 0 on success and -1 on
failure, which is the opposite of what proberi should return.

Fix it by checking the return code of page_check_range() and return the
expected return value.

The easiest way to reproduce the issue is by running
"/lib/ld.so.1 --version" in a chroot which fails without this patch.
At startup of ld.so the __canonicalize_funcptr_for_compare() function is
used to resolve the function address out of a function descriptor, which
fails because proberi (due to the wrong return code) seems to indicate
that the given address isn't accessible.

Signed-off-by: Helge Deller <deller@gmx.de>
2022-08-19 15:59:14 +02:00
..
alpha
arm target/arm: Don't report Statistical Profiling Extension in ID registers 2022-08-12 11:17:35 +01:00
avr
cris
hexagon
hppa target/hppa: Fix proberi instruction emulation for linux-user 2022-08-19 15:59:14 +02:00
i386
loongarch docs/system/loongarch: Update the LoongArch document 2022-08-13 04:45:03 -07:00
m68k
microblaze
mips target/mips: Handle lock_user() failure in UHI_plog semihosting call 2022-08-08 23:22:36 +02:00
nios2
openrisc
ppc
riscv
rx
s390x
sh4
sparc
tricore
xtensa
Kconfig
meson.build