mirror_qemu/include
Max Filippov ebf9a3630c linux-user: fix mmap/munmap/mprotect/mremap/shmat
In linux-user QEMU that runs for a target with TARGET_ABI_BITS bigger
than L1_MAP_ADDR_SPACE_BITS an assertion in page_set_flags fires when
mmap, munmap, mprotect, mremap or shmat is called for an address outside
the guest address space. mmap and mprotect should return ENOMEM in such
case.

Change definition of GUEST_ADDR_MAX to always be the last valid guest
address. Account for this change in open_self_maps.
Add macro guest_addr_valid that verifies if the guest address is valid.
Add function guest_range_valid that verifies if address range is within
guest address space and does not wrap around. Use that macro in
mmap/munmap/mprotect/mremap/shmat for error checking.

Cc: qemu-stable@nongnu.org
Cc: Riku Voipio <riku.voipio@iki.fi>
Cc: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20180307215010.30706-1-jcmvbkbc@gmail.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2018-03-09 19:21:34 +01:00
..
block Block layer patches 2018-03-06 11:20:44 +00:00
chardev Include less of the generated modular QAPI headers 2018-03-02 13:45:50 -06:00
crypto Include less of the generated modular QAPI headers 2018-03-02 13:45:50 -06:00
disas RISC-V Disassembler 2018-03-07 08:30:28 +13:00
exec linux-user: fix mmap/munmap/mprotect/mremap/shmat 2018-03-09 19:21:34 +01:00
fpu softfloat: use floatx80_infinity in softfloat 2018-03-04 17:27:35 +01:00
hw QEMU RISC-V Emulation Support (RV64GC, RV32GC) 2018-03-09 10:58:57 +00:00
io qio: non-default context for TLS handshake 2018-03-06 10:19:07 +00:00
libdecnumber Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
migration Include less of the generated modular QAPI headers 2018-03-02 13:45:50 -06:00
monitor qapi: Empty out qapi-schema.json 2018-03-02 13:45:50 -06:00
net -----BEGIN PGP SIGNATURE----- 2018-03-05 14:27:24 +00:00
qapi qapi: Move qapi-schema.json to qapi/, rename generated files 2018-03-02 13:45:57 -06:00
qemu lockable: workaround GCC link issue with ASAN 2018-03-06 14:01:27 +01:00
qom qmp: Add qom-list-properties to list QOM object properties 2018-03-06 14:01:26 +01:00
scsi Include qapi/qmp/qdict.h exactly where needed 2018-02-09 13:52:15 +01:00
standard-headers virtio-gpu-3d: add support for second capability set (v4) 2018-02-26 13:41:34 +01:00
sysemu RISC-V Build Infrastructure 2018-03-07 08:30:28 +13:00
ui ui: build curses, gtk and sdl as modules. 2018-03-05 15:16:30 +00:00
elf.h RISC-V ELF Machine Definition 2018-03-07 08:30:28 +13:00
glib-compat.h glib-compat: move G_SOURCE_CONTINUE/REMOVE there 2017-10-10 16:33:55 +02:00
qemu-common.h Move include qemu/option.h from qemu-common.h to actual users 2018-02-09 13:52:16 +01:00
qemu-io.h hmp: Request permissions in qemu-io 2017-02-28 20:47:50 +01:00
trace-tcg.h trace: get rid of generated-events.h/generated-events.c 2016-10-12 09:54:52 +02:00