qemu-e2k/bsd-user
Richard Henderson a05cee93f4 linux-user: Use ARRAY_SIZE with bitmask_transtbl
Rather than using a zero tuple to end the table, use a macro
to apply ARRAY_SIZE and pass that on to the convert functions.

This fixes two bugs in which the conversion functions required
that both the target and host masks be non-zero in order to
continue, rather than require both target and host masks be
zero in order to terminate.

This affected mmap_flags_tbl when the host does not support
all of the flags we wish to convert (e.g. MAP_UNINITIALIZED).
Mapping these flags to zero is good enough, and matches how
the kernel ignores bits that are unknown.

Fixes: 4b840f96 ("linux-user: Populate more bits in mmap_flags_tbl")
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2023-08-09 07:17:42 -07:00
..
arm bsd-user: Clean up includes 2023-02-08 07:16:23 +01:00
freebsd *-user: remove the guest_user_syscall tracepoints 2023-06-01 11:03:55 -04:00
host bsd-user: Catch up with sys/param.h requirement for machine/pmap.h 2022-10-26 14:09:17 -06:00
i386 target/i386: implement SYSCALL/SYSRET in 32-bit emulators 2023-06-26 10:23:56 +02:00
include
netbsd Clean up ill-advised or unusual header guards 2022-05-11 16:50:01 +02:00
openbsd Clean up ill-advised or unusual header guards 2022-05-11 16:50:01 +02:00
x86_64 bsd-user: Clean up includes 2023-02-08 07:16:23 +01:00
bsd-file.h bsd-user: Remove stray 'inline' from do_bsd_close 2022-07-02 07:52:48 -06:00
bsd-proc.h bsd-user: Clean up includes 2023-02-08 07:16:23 +01:00
bsdload.c
elfcore.c
elfload.c disas: Remove target_ulong from the interface 2023-05-11 09:49:51 +01:00
errno_defs.h Clean up ill-advised or unusual header guards 2022-05-11 16:50:01 +02:00
main.c bsd-user: Allocate guest virtual address space 2023-07-31 12:19:13 -07:00
meson.build bsd-user: Move system call building to os-syscall.c 2022-02-26 10:01:38 -07:00
mmap.c bsd-user: Remove last_brk 2023-08-06 16:46:13 -07:00
qemu.h bsd-user: Remove last_brk 2023-08-06 16:46:13 -07:00
signal-common.h bsd-user/signal.c: Only copy the _capsicum for FreeBSD_version > 1400026 2022-02-01 14:43:20 -07:00
signal.c gdbstub: move chunks of user code into own files 2023-03-07 20:44:04 +00:00
strace.c bsd-user: Clean up includes 2023-02-08 07:16:23 +01:00
syscall_defs.h linux-user: Use ARRAY_SIZE with bitmask_transtbl 2023-08-09 07:17:42 -07:00
trace-events bsd-user: Add trace events for bsd-user 2022-01-28 15:53:41 -07:00
trace.h bsd-user: Add trace events for bsd-user 2022-01-28 15:53:41 -07:00
uaccess.c