qemu/linux-user
Stefan 4df7b7fac8 linux-user/syscall: Fix do_ioctl_ifconf() for 64 bit targets.
The sizeof(struct ifreq) is 40 for 64 bit and 32 for 32 bit architectures.
This structure contains a union of other structures, of which struct ifmap
is the biggest for 64 bit architectures. Calling ioclt(…, SIOCGIFCONF, …)
fills a struct sockaddr of that union, and do_ioctl_ifconf() only considered
that struct sockaddr for the size of the union, which has the same size as
struct ifmap on 32 bit architectures. So do_ioctl_ifconf() assumed a wrong
size of 32 for struct ifreq instead of the correct size of 40 on 64 bit
architectures.

The fix makes do_ioctl_ifconf() handle struct ifmap as the biggest part of
the union, treating struct ifreq with the correct size.

Signed-off-by: Stefan <stefan-guix@vodafonemail.de>
Message-Id: <60AA0765-53DD-43D1-A3D2-75F1778526F6@vodafonemail.de>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2021-02-13 22:50:50 +01:00
..
aarch64 semihosting: Change common-semi API to be architecture-independent 2021-01-18 10:05:06 +00:00
alpha linux-user: Add missing TARGET___O_TMPFILE for hppa and alpha 2021-02-13 22:50:49 +01:00
arm semihosting: Change common-semi API to be architecture-independent 2021-01-18 10:05:06 +00:00
cris linux user: Fix Lesser GPL version number 2020-11-15 16:41:26 +01:00
generic linux-user: Remove obsolete F_SHLCK and F_EXLCK translation 2021-01-21 13:27:34 +01:00
host linux-user/: fix some comment spelling errors 2020-09-17 20:39:22 +02:00
hppa linux-user: fix O_NONBLOCK in signalfd4() and eventfd2() syscalls 2021-02-13 22:50:49 +01:00
i386 linux user: Fix Lesser GPL version number 2020-11-15 16:41:26 +01:00
m68k linux-user: Correct definition of stack_t 2020-11-11 10:59:39 +01:00
microblaze linux user: Fix Lesser GPL version number 2020-11-15 16:41:26 +01:00
mips target/mips: Extract FPU helpers to 'fpu_helper.h' 2021-01-14 17:13:53 +01:00
mips64 linux-user/mips64: Support o32 ABI syscalls 2021-02-13 22:50:49 +01:00
nios2 linux user: Fix Lesser GPL version number 2020-11-15 16:41:26 +01:00
openrisc linux-user: update syscall_nr.h to Linux 5.9-rc7 2020-10-26 11:39:23 +01:00
ppc linux user: Fix Lesser GPL version number 2020-11-15 16:41:26 +01:00
riscv riscv: Add semihosting support for user mode 2021-01-18 10:05:06 +00:00
s390x linux user: Fix Lesser GPL version number 2020-11-15 16:41:26 +01:00
sh4 linux-user: Correct definition of stack_t 2020-11-11 10:59:39 +01:00
sparc linux-user/sparc: Handle tstate in sparc64_get/set_context() 2020-12-18 11:23:29 +01:00
sparc64 linux user: Fix Lesser GPL version number 2020-11-15 16:41:26 +01:00
tilegx linux user: Fix Lesser GPL version number 2020-11-15 16:41:26 +01:00
x86_64 linux user: Fix Lesser GPL version number 2020-11-15 16:41:26 +01:00
xtensa linux-user: update syscall.tbl to Linux 5.9-rc7 2020-10-26 11:39:23 +01:00
cpu_loop-common.h cpu: Replace ENV_GET_CPU with env_cpu 2019-06-10 07:03:34 -07:00
elfload.c linux-user: Fix loading of BSS segments 2021-02-13 22:50:49 +01:00
errno_defs.h Supply missing header guards 2019-06-12 13:20:21 +02:00
exit.c gdbstub: drop CPUEnv from gdb_exit() 2021-01-18 10:05:06 +00:00
fd-trans.c linux-user,netlink: add IFLA_BRPORT_MRP_RING_OPEN, IFLA_BRPORT_MRP_IN_OPEN 2020-11-17 15:22:52 +01:00
fd-trans.h
flat.h linux-user/: fix some comment spelling errors 2020-09-17 20:39:22 +02:00
flatload.c linux-user/: fix some comment spelling errors 2020-09-17 20:39:22 +02:00
ioctls.h linux-user: Conditionalize TUNSETVNETLE 2021-01-07 05:09:06 -10:00
linux_loop.h
linuxload.c avoid TABs in files that only contain a few 2019-01-11 15:46:56 +01:00
main.c accel: replace struct CpusAccel with AccelOpsClass 2021-02-05 10:24:15 -10:00
meson.build semihosting: Move ARM semihosting code to shared directories 2021-01-18 10:05:06 +00:00
mmap.c linux-user/mmap: Avoid asserts for out of range mremap calls 2021-02-13 22:50:50 +01:00
qemu.h riscv: Add semihosting support 2021-01-18 10:05:06 +00:00
safe-syscall.S
semihost.c riscv: Add semihosting support 2021-01-18 10:05:06 +00:00
signal-common.h linux-user: Make sigaltstack stacks per-thread 2019-07-26 19:24:33 +02:00
signal.c linux-user/signal: Decode waitid si_code 2021-02-13 22:50:49 +01:00
socket.h Supply missing header guards 2019-06-12 13:20:21 +02:00
strace.c linux-user: Add IPv6 options to do_print_sockopt() 2021-01-21 13:27:08 +01:00
strace.list linux-user: Add strace support for printing arguments of some clock and time functions 2020-08-27 12:29:50 +02:00
syscall.c linux-user/syscall: Fix do_ioctl_ifconf() for 64 bit targets. 2021-02-13 22:50:50 +01:00
syscall_defs.h linux-user: Support F_ADD_SEALS and F_GET_SEALS fcntls 2021-01-20 18:21:03 +01:00
syscall_types.h linux-user: Add support for btrfs ioctls used to scrub a filesystem 2020-09-03 01:09:35 +02:00
target_flat.h Supply missing header guards 2019-06-12 13:20:21 +02:00
trace-events linux-user: fix use of SIGRTMIN 2020-02-12 18:56:41 +01:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
uaccess.c avoid TABs in files that only contain a few 2019-01-11 15:46:56 +01:00
uname.c cpu: Replace ENV_GET_CPU with env_cpu 2019-06-10 07:03:34 -07:00
uname.h
vm86.c linux-user: Use `qemu_log' for non-strace logging 2020-02-19 11:17:40 +01:00