oslib: allocate PROT_NONE pages on top of RAM
commit9fac18f03a9040b67ec38e14d3e1ed34db9c7e06
authorMichael S. Tsirkin <mst@redhat.com>
Thu, 10 Sep 2015 13:41:17 +0000 (10 16:41 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 1 Oct 2015 13:16:52 +0000 (1 16:16 +0300)
tree0a2b3aef43106edfbf64a788d07d69874ff64bda
parentc2dfc5ba3fb3a1b7278c99bfd3bf350202169434
oslib: allocate PROT_NONE pages on top of RAM

This inserts a read and write protected page between RAM and QEMU
memory. This makes it harder to exploit QEMU bugs resulting from buffer
overflows in devices using variants of cpu_physical_memory_map,
dma_memory_map etc.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
util/oslib-posix.c