[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen staging] x86/MCE: correct struct mcinfo_extended for compat guests



commit 09488b2bb76da2c78b9e25c7041e004baba1ca6a
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Thu Jan 9 11:09:02 2020 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Thu Jan 9 11:09:02 2020 +0100

    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@xxxxxxxx>
    Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
 xen/include/public/arch-x86/xen-mca.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/include/public/arch-x86/xen-mca.h 
b/xen/include/public/arch-x86/xen-mca.h
index 72649c5446..b5e04b5444 100644
--- a/xen/include/public/arch-x86/xen-mca.h
+++ b/xen/include/public/arch-x86/xen-mca.h
@@ -170,9 +170,9 @@ struct mcinfo_extended {
     /*
      * Currently Intel extended MSR (32/64) include all gp registers
      * and E(R)FLAGS, E(R)IP, E(R)MISC, up to 11/19 of them might be
-     * useful at present. So expand this array to 16/32 to leave room.
+     * useful at present. So expand this array to 32 to leave room.
      */
-    struct mcinfo_msr mc_msr[sizeof(void *) * 4];
+    struct mcinfo_msr mc_msr[32];
 };
 
 /* Recovery Action flags. Giving recovery result information to DOM0 */
--
generated by git-patchbot for /home/xen/git/xen.git#staging

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.