x86/MCE: correct struct mcinfo_extended for compat guests
authorJan Beulich <jbeulich@suse.com>
Thu, 9 Jan 2020 10:09:02 +0000 (11:09 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 9 Jan 2020 10:09:02 +0000 (11:09 +0100)
commit09488b2bb76da2c78b9e25c7041e004baba1ca6a
tree57a7f19145c0d5b8fd7db66d68e08d4f72b9065d
parent9fdad93087e04cb3a155c62344eb88149e1cfc4a
x86/MCE: correct struct mcinfo_extended for compat guests

The use of any kind of pointers in the public interface is wrong,
including dimensioning arrays based on the size of pointers. The least
bad option of addressing the issue looks to be to pin down the number
that the (64-bit) hypervisor has used anyway (even when passing
information to compat but privileged guests). There aren't actual
instantiations of the structure apart from ones allocated dynamically
out of struct mc_info's mi_data[], which is entirely controlled by the
hypervisor.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/include/public/arch-x86/xen-mca.h