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

[xen staging] evtchn: refuse EVTCHNOP_status for Xen-bound event channels



commit f60ab5337f968e2f10c639ab59db7afb0fe4f7c3
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Wed Sep 30 09:10:01 2020 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Wed Sep 30 09:10:01 2020 +0200

    evtchn: refuse EVTCHNOP_status for Xen-bound event channels
    
    Callers have no business knowing the state of the Xen end of an event
    channel.
    
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Acked-by: Julien Grall <jgrall@xxxxxxxxxx>
    Reviewed-by: Paul Durrant <Paul@xxxxxxx>
---
 xen/common/event_channel.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c
index d2ee83bbbf..49cb318b81 100644
--- a/xen/common/event_channel.c
+++ b/xen/common/event_channel.c
@@ -933,6 +933,11 @@ int evtchn_status(evtchn_status_t *status)
     }
 
     chn = evtchn_from_port(d, port);
+    if ( consumer_is_xen(chn) )
+    {
+        rc = -EACCES;
+        goto out;
+    }
 
     rc = xsm_evtchn_status(XSM_TARGET, d, chn);
     if ( rc )
--
generated by git-patchbot for /home/xen/git/xen.git#staging



 


Rackspace

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