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

[Xen-changelog] [xen master] xen/pvshim: fix GNTTABOP_query_size hypercall forwarding with SMAP



commit 1124a9a26f05439a3aa31eaea227285e50dc94c0
Author:     Roger Pau Monne <roger.pau@xxxxxxxxxx>
AuthorDate: Fri Jan 26 15:29:10 2018 +0000
Commit:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Fri Jan 26 18:28:47 2018 +0000

    xen/pvshim: fix GNTTABOP_query_size hypercall forwarding with SMAP
    
    Disable SMAP in the shim before bouncing the hypercall, or else L0
    will fail to get the hypercall buffer.
    
    Reported-by: Fatih Acar <fatih.acar@xxxxxxxxx>
    Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
    Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Reviewed-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
 xen/arch/x86/pv/shim.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/xen/arch/x86/pv/shim.c b/xen/arch/x86/pv/shim.c
index 6e42208..534965c 100644
--- a/xen/arch/x86/pv/shim.c
+++ b/xen/arch/x86/pv/shim.c
@@ -757,7 +757,10 @@ static long pv_shim_grant_table_op(unsigned int cmd,
     }
 
     case GNTTABOP_query_size:
+        /* Disable SMAP so L0 can access the buffer. */
+        stac();
         rc = xen_hypercall_grant_table_op(GNTTABOP_query_size, uop.p, count);
+        clac();
         break;
 
     default:
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
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®.