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

Re: [Xen-devel] [PATCH] io/ring.h: drop unused and broken *_RING_ATTACH() macros


  • To: Jan Beulich <JBeulich@xxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxx>
  • From: Keir Fraser <keir.xen@xxxxxxxxx>
  • Date: Tue, 11 Jun 2013 11:09:50 +0100
  • Delivery-date: Tue, 11 Jun 2013 10:10:29 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>
  • Thread-index: Ac5mi88EsdBtq6QEykCuI9GuswsTqw==
  • Thread-topic: [Xen-devel] [PATCH] io/ring.h: drop unused and broken *_RING_ATTACH() macros

On 11/06/2013 09:47, "Jan Beulich" <JBeulich@xxxxxxxx> wrote:

> Initializing r*_prod_pvt and r*_cons from independent shared ring
> fields is broken, as other macros in this header rely on them being
> coupled. Furthermore using the backend variant would also imply a
> security vulnerability.
> 
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

Acked-by: Keir Fraser <keir@xxxxxxx>

> --- a/xen/include/public/io/ring.h
> +++ b/xen/include/public/io/ring.h
> @@ -174,21 +174,6 @@ typedef struct __name##_back_ring __name
>      (_r)->sring = (_s);                                                 \
>  } while (0)
>  
> -/* Initialize to existing shared indexes -- for recovery */
> -#define FRONT_RING_ATTACH(_r, _s, __size) do {                          \
> -    (_r)->sring = (_s);                                                 \
> -    (_r)->req_prod_pvt = (_s)->req_prod;                                \
> -    (_r)->rsp_cons = (_s)->rsp_prod;                                    \
> -    (_r)->nr_ents = __RING_SIZE(_s, __size);                            \
> -} while (0)
> -
> -#define BACK_RING_ATTACH(_r, _s, __size) do {                           \
> -    (_r)->sring = (_s);                                                 \
> -    (_r)->rsp_prod_pvt = (_s)->rsp_prod;                                \
> -    (_r)->req_cons = (_s)->req_prod;                                    \
> -    (_r)->nr_ents = __RING_SIZE(_s, __size);                            \
> -} while (0)
> -
>  /* How big is this ring? */
>  #define RING_SIZE(_r)                                                   \
>      ((_r)->nr_ents)
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxx
> http://lists.xen.org/xen-devel



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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