qemu-e2k/linux-user
Peter Maydell f516511ea8 linux-user: Fix calculation of auxv length
In commit 7c4ee5bcc8 we changed the order in which we construct
the AUXV, but forgot to adjust the calculation of the length. The
result is that we set info->auxv_len to a bogus and negative value,
and then later on the code in open_self_auxv() gets confused and
ends up presenting the guest with an empty file.

Since we now have to calculate the auxv length up-front as part
of figuring out how much we're going to put on the stack, set
info->auxv_len then; this allows us to assert that we put the
same number of entries into auxv as we pre-calculated, rather
than merely having a comment saying we need to do that.

Fixes: https://bugs.launchpad.net/qemu/+bug/1728116

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2017-11-20 16:15:41 +02:00
..
aarch64
alpha
arm linux-user: Tidy and enforce reserved_va initialization 2017-10-16 16:00:56 +03:00
cris
host Replace 'struct ucontext' with 'ucontext_t' type 2017-07-20 10:10:28 +01:00
hppa linux-user/hppa: Fix typo for TARGET_NR_epoll_wait 2017-11-07 21:58:13 +02:00
i386
m68k
microblaze
mips
mips64
nios2
openrisc
ppc
s390x
sh4
sparc sparc: embed sparc_def_t into CPUSPARCState 2017-09-01 11:54:24 -03:00
sparc64
tilegx
unicore32
x86_64
elfload.c linux-user: Fix calculation of auxv length 2017-11-20 16:15:41 +02:00
errno_defs.h
flat.h
flatload.c
ioctls.h linux-user: Add some random ioctls 2017-10-16 21:00:04 +03:00
linux_loop.h
linuxload.c
m68k-sim.c
main.c linux-user/ppc: Report correct fault address for data faults 2017-11-07 21:58:43 +02:00
Makefile.objs
mmap.c
qemu.h
safe-syscall.S
signal.c linux-user: Restrict usage of sa_restorer 2017-11-07 21:58:12 +02:00
socket.h
strace.c linux-user: fix O_TMPFILE handling 2017-10-16 16:00:56 +03:00
strace.list
syscall_defs.h linux-user: Handle TARGET_MAP_STACK and TARGET_MAP_HUGETLB 2017-11-07 21:58:13 +02:00
syscall_types.h
syscall.c linux-user: Handle rt_sigaction correctly for SPARC 2017-11-07 21:59:51 +02:00
target_flat.h
trace-events trace-events: fix code style: print 0x before hex numbers 2017-08-01 12:13:07 +01:00
uaccess.c
uname.c
uname.h
vm86.c