qemu/linux-user
Peter Maydell bb3ba35f20 linux-user: check that all of AArch64 SVE extended sigframe is writable
In commit 8c5931de0a we added support for SVE extended
sigframe records.  These mean that the signal frame might now be
larger than the size of the target_rt_sigframe record, so make sure
we call lock_user on the entire frame size when we're creating it.
(The code for restoring the signal frame already correctly handles
the extended records by locking the 'extra' section separately to the
main section.)

In particular, this fixes a bug even for non-SVE signal frames,
because it extends the locked section to cover the
target_rt_frame_record. Previously this was part of 'struct
target_rt_sigframe', but in commit e1eecd1d9d we pulled
it out into its own struct, and so locking the target_rt_sigframe
alone doesn't cover it. This bug would mean that we would fail
to correctly handle the case where a signal was taken with
SP pointing 16 bytes into an unwritable page, with the page
immediately below it in memory being writable.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
2018-04-17 12:04:58 +01:00
..
aarch64 linux-user: Implement aarch64 PR_SVE_SET/GET_VL 2018-03-09 17:09:43 +00:00
alpha
arm
cris
host
hppa
i386
m68k
microblaze linux-user: fix microblaze get_sp_from_cpustate() 2018-04-10 17:41:55 +02:00
mips
mips64
nios2
openrisc
ppc
riscv RISC-V Linux User Emulation 2018-03-07 08:30:28 +13:00
s390x
sh4
sparc
sparc64
tilegx
x86_64
xtensa target/xtensa: linux-user: fix sysv IPC structures 2018-04-01 14:05:23 -07:00
elfload.c linux-user: implement HWCAP bits on MIPS 2018-04-10 18:00:14 +02:00
errno_defs.h
flat.h
flatload.c
ioctls.h
linux_loop.h
linuxload.c
m68k-sim.c
main.c target/xtensa: linux-user: rewind pc for restarted syscall 2018-03-31 14:06:35 -07:00
Makefile.objs
mmap.c linux-user: drop unused target_msync function 2018-03-13 11:30:22 -07:00
qemu.h linux-user: drop unused target_msync function 2018-03-13 11:30:22 -07:00
safe-syscall.S
signal.c linux-user: check that all of AArch64 SVE extended sigframe is writable 2018-04-17 12:04:58 +01:00
socket.h
strace.c
strace.list
syscall.c Fix file offset for preadv/pwritev linux-user syscalls. 2018-04-10 10:22:45 +01:00
syscall_defs.h linux-user: fix TARGET___O_TMPFILE for sparc 2018-04-03 11:50:24 +02:00
syscall_types.h
target_flat.h
trace-events
uaccess.c
uname.c
uname.h
vm86.c