mirror of
https://github.com/utmapp/qemu.git
synced 2026-12-01 22:23:23 -10:00
We already use MADV_NORESERVE to deal with sparse memory regions. Let's also set madvise(MADV_DONTDUMP), otherwise a crash of the process can result in us allocating all memory in the mmap'ed region for dumping purposes. This change implies that the mmap'ed rings won't be included in a coredump. If ever required for debugging purposes, we could mark only the mapped rings MADV_DODUMP. Ignore errors during madvise() for now. Reviewed-by: Raphael Norwitz <[email protected]> Acked-by: Stefano Garzarella <[email protected]> Signed-off-by: David Hildenbrand <[email protected]> Message-Id: <[email protected]> Tested-by: Mario Casquero <[email protected]> Reviewed-by: Michael S. Tsirkin <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]>