diff mbox series

[01/12] evtchn: refuse EVTCHNOP_status for Xen-bound event channels

Message ID e7331fa6-e557-4319-6137-2c2525f78822@suse.com
State Superseded
Headers show
Series evtchn: recent XSAs follow-on | expand

Commit Message

Jan Beulich Sept. 28, 2020, 10:56 a.m. UTC
Callers have no business knowing the state of the Xen end of an event
channel.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

Comments

Julien Grall Sept. 29, 2020, 8:49 a.m. UTC | #1
Hi Jan,

On 28/09/2020 11:56, Jan Beulich wrote:
> 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>

Cheers,

> 
> --- a/xen/common/event_channel.c
> +++ b/xen/common/event_channel.c
> @@ -933,6 +933,11 @@ int evtchn_status(evtchn_status_t *statu
>       }
>   
>       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 )
>
Paul Durrant Sept. 29, 2020, 3:39 p.m. UTC | #2
> -----Original Message-----
> From: Xen-devel <xen-devel-bounces@lists.xenproject.org> On Behalf Of Jan Beulich
> Sent: 28 September 2020 11:56
> To: xen-devel@lists.xenproject.org
> Cc: Andrew Cooper <andrew.cooper3@citrix.com>; George Dunlap <George.Dunlap@eu.citrix.com>; Ian
> Jackson <iwj@xenproject.org>; Julien Grall <julien@xen.org>; Wei Liu <wl@xen.org>; Stefano Stabellini
> <sstabellini@kernel.org>
> Subject: [PATCH 01/12] 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@suse.com>
> 

Reviewed-by: Paul Durrant <Paul@xen.org>

> --- a/xen/common/event_channel.c
> +++ b/xen/common/event_channel.c
> @@ -933,6 +933,11 @@ int evtchn_status(evtchn_status_t *statu
>      }
> 
>      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 )
>
diff mbox series

Patch

--- a/xen/common/event_channel.c
+++ b/xen/common/event_channel.c
@@ -933,6 +933,11 @@  int evtchn_status(evtchn_status_t *statu
     }
 
     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 )