diff options
| author | Helge Deller <deller@gmx.de> | 2022-08-16 09:58:14 +0200 |
|---|---|---|
| committer | Helge Deller <deller@gmx.de> | 2022-08-19 15:59:14 +0200 |
| commit | 6fab0c182dabaca5b3d56e60a8de3122ce9afbea (patch) | |
| tree | b41cc977127148e6d17063f85f566c5b4c109b11 /hw/m68k/virt.c | |
| parent | c7208a6e0d049f9e8af15df908168a79b1f99685 (diff) | |
| download | focaccia-qemu-6fab0c182dabaca5b3d56e60a8de3122ce9afbea.tar.gz focaccia-qemu-6fab0c182dabaca5b3d56e60a8de3122ce9afbea.zip | |
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>
Diffstat (limited to 'hw/m68k/virt.c')
0 files changed, 0 insertions, 0 deletions