qemu-e2k/linux-user
Helge Deller b8002058c4 linux-user: Fix openat() emulation to correctly detect accesses to /proc
In qemu we catch accesses to files like /proc/cpuinfo or /proc/net/route
and return to the guest contents which would be visible on a real system
(instead what the host would show).

This patch fixes a bug, where for example the accesses
    cat /proc////cpuinfo
or
    cd /proc && cat cpuinfo
will not be recognized by qemu and where qemu will wrongly show
the contents of the host's /proc/cpuinfo file.

Signed-off-by: Helge Deller <deller@gmx.de>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20230803214450.647040-2-deller@gmx.de>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2023-08-09 09:31:30 -07:00
..
aarch64 linux-user: Define ELF_ET_DYN_BASE in $guest/target_mman.h 2023-08-08 13:27:15 -07:00
alpha linux-user: Define ELF_ET_DYN_BASE in $guest/target_mman.h 2023-08-08 13:27:15 -07:00
arm linux-user: Define ELF_ET_DYN_BASE in $guest/target_mman.h 2023-08-08 13:27:15 -07:00
cris linux-user: Define ELF_ET_DYN_BASE in $guest/target_mman.h 2023-08-08 13:27:15 -07:00
generic linux-user: Split TARGET_PROT_* out of syscall_defs.h 2023-07-15 08:02:32 +01:00
hexagon linux-user: Define ELF_ET_DYN_BASE in $guest/target_mman.h 2023-08-08 13:27:15 -07:00
hppa linux-user: Define ELF_ET_DYN_BASE in $guest/target_mman.h 2023-08-08 13:27:15 -07:00
i386 linux-user: Define ELF_ET_DYN_BASE in $guest/target_mman.h 2023-08-08 13:27:15 -07:00
include linux-user: cleanup unused linux-user/include/host directories 2023-08-08 20:44:08 +02:00
loongarch64 linux-user: Define ELF_ET_DYN_BASE in $guest/target_mman.h 2023-08-08 13:27:15 -07:00
m68k linux-user: Define ELF_ET_DYN_BASE in $guest/target_mman.h 2023-08-08 13:27:15 -07:00
microblaze linux-user: Define ELF_ET_DYN_BASE in $guest/target_mman.h 2023-08-08 13:27:15 -07:00
mips linux-user: Define ELF_ET_DYN_BASE in $guest/target_mman.h 2023-08-08 13:27:15 -07:00
mips64 linux-user: Split TARGET_MAP_* out of syscall_defs.h 2023-07-15 08:02:32 +01:00
nios2 linux-user: Define ELF_ET_DYN_BASE in $guest/target_mman.h 2023-08-08 13:27:15 -07:00
openrisc linux-user: Define ELF_ET_DYN_BASE in $guest/target_mman.h 2023-08-08 13:27:15 -07:00
ppc linux-user: Define ELF_ET_DYN_BASE in $guest/target_mman.h 2023-08-08 13:27:15 -07:00
riscv linux-user: Define ELF_ET_DYN_BASE in $guest/target_mman.h 2023-08-08 13:27:15 -07:00
s390x linux-user: Define ELF_ET_DYN_BASE in $guest/target_mman.h 2023-08-08 13:27:15 -07:00
sh4 linux-user: Define ELF_ET_DYN_BASE in $guest/target_mman.h 2023-08-08 13:27:15 -07:00
sparc linux-user: Define ELF_ET_DYN_BASE in $guest/target_mman.h 2023-08-08 13:27:15 -07:00
x86_64 linux-user: Define ELF_ET_DYN_BASE in $guest/target_mman.h 2023-08-08 13:27:15 -07:00
xtensa linux-user: Define ELF_ET_DYN_BASE in $guest/target_mman.h 2023-08-08 13:27:15 -07:00
cpu_loop-common.h
elfload.c linux-user: Rewrite non-fixed probe_guest_base 2023-08-08 13:41:55 -07:00
errnos.c.inc
exit.c *: Add missing includes of qemu/plugin.h 2023-03-22 15:06:57 +00:00
fd-trans.c linux-user: handle netlink flag NLA_F_NESTED 2023-03-10 20:45:47 +01:00
fd-trans.h linux-user: fix timerfd read endianness conversion 2023-03-10 20:42:00 +01:00
flat.h
flatload.c linux-user: Properly set image_info.brk in flatload 2023-08-06 16:46:13 -07:00
ioctls.h
linux_loop.h
linuxload.c
loader.h linux-user/elfload: Introduce elf_hwcap_str() on s390x 2023-06-05 20:48:34 +02:00
main.c linux-user: Define ELF_ET_DYN_BASE in $guest/target_mman.h 2023-08-08 13:27:15 -07:00
meson.build
mmap.c linux-user: Define ELF_ET_DYN_BASE in $guest/target_mman.h 2023-08-08 13:27:15 -07:00
qemu.h linux-user: Adjust initial brk when interpreter is close to executable 2023-08-08 13:27:17 -07:00
semihost.c
signal-common.h
signal.c gdbstub: move chunks of user code into own files 2023-03-07 20:44:04 +00:00
socket.h
strace.c linux-user: Fix strace output for old_mmap 2023-07-18 20:42:05 +02:00
strace.h
strace.list linux-user: Improve strace output of pread64() and pwrite64() 2023-07-08 16:55:08 +02:00
syscall_defs.h linux-user: Split TARGET_PROT_* out of syscall_defs.h 2023-07-15 08:02:32 +01:00
syscall_types.h
syscall.c linux-user: Fix openat() emulation to correctly detect accesses to /proc 2023-08-09 09:31:30 -07:00
thunk.c linux-user: Use ARRAY_SIZE with bitmask_transtbl 2023-08-09 07:17:42 -07:00
trace-events
trace.h
uaccess.c
uname.c
uname.h
user-internals.h linux-user: Pass last not end to probe_guest_base 2023-03-28 15:23:10 -07:00
user-mmap.h linux-user: Define ELF_ET_DYN_BASE in $guest/target_mman.h 2023-08-08 13:27:15 -07:00
vm86.c