From: Ian Campbell Subject: [PATCH] make shared ring pad field less enticing for users by adding a __ prefix Date: Thu, 01 Jul 2010 11:22:38 +0100 Message-ID: <15ff0488237776ab97bb.1277979758@zakaz.uk.xensource.com> References: <9fb06660a061dbb19ca0.1277976128@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <9fb06660a061dbb19ca0.1277976128@localhost.localdomain> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: Ian Campbell List-Id: xen-devel@lists.xenproject.org Signed-off-by: Ian Campbell Cc: Jeremy Fitzhardinge Cc: Daniel Stodden Cc: Dongxiao Xu diff -r 0918ea363872 -r 15ff04882377 xen/include/public/io/ring.h --- a/xen/include/public/io/ring.h Thu Jul 01 11:18:21 2010 +0100 +++ b/xen/include/public/io/ring.h Thu Jul 01 11:19:33 2010 +0100 @@ -112,7 +112,7 @@ } tapif_user; \ uint8_t pvt_pad[4]; \ } private; \ - uint8_t pad[44]; \ + uint8_t __pad[44]; \ union __name##_sring_entry ring[1]; /* variable-length */ \ }; \ \ @@ -156,7 +156,8 @@ #define SHARED_RING_INIT(_s) do { \ (_s)->req_prod = (_s)->rsp_prod = 0; \ (_s)->req_event = (_s)->rsp_event = 1; \ - (void)memset((_s)->pad, 0, sizeof((_s)->pad)); \ + (void)memset((_s)->private.pvt_pad, 0, sizeof((_s)->private.pvt_pad)); \ + (void)memset((_s)->__pad, 0, sizeof((_s)->__pad)); \ } while(0) #define FRONT_RING_INIT(_r, _s, __size) do { \