]> xenbits.xensource.com Git - people/pauldu/xen.git/commitdiff
evtchn: refuse EVTCHNOP_status for Xen-bound event channels
authorJan Beulich <jbeulich@suse.com>
Wed, 30 Sep 2020 07:10:01 +0000 (09:10 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 30 Sep 2020 07:10:01 +0000 (09:10 +0200)
Callers have no business knowing the state of the Xen end of an event
channel.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Julien Grall <jgrall@amazon.com>
Reviewed-by: Paul Durrant <Paul@xen.org>
xen/common/event_channel.c

index d2ee83bbbf45972aab358da653d56dd722bab838..49cb318b817149ecfc59a0f442f0bec396257f9b 100644 (file)
@@ -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 )