]> git.proxmox.com Git - mirror_qemu.git/commit
util/oslib-posix: Forward SIGBUS to MCE handler under Linux
authorDavid Hildenbrand <david@redhat.com>
Fri, 17 Dec 2021 13:46:10 +0000 (14:46 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Sat, 8 Jan 2022 00:30:13 +0000 (19:30 -0500)
commit29b838c05dc20fa00fc08e952f710478829aa1c7
tree5ba93a7d8e650d49c466b55af562d6e6e23d793b
parenta960d6642d39f7d255b7b2b8bda3c2ae4e4e649b
util/oslib-posix: Forward SIGBUS to MCE handler under Linux

Temporarily modifying the SIGBUS handler is really nasty, as we might be
unlucky and receive an MCE SIGBUS while having our handler registered.
Unfortunately, there is no way around messing with SIGBUS when
MADV_POPULATE_WRITE is not applicable or not around.

Let's forward SIGBUS that don't belong to us to the already registered
handler and document the situation.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20211217134611.31172-8-david@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
softmmu/cpus.c
util/oslib-posix.c