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

Re: [Xen-devel] [PATCH] fix compat memory exchange op splitting


  • To: Jan Beulich <JBeulich@xxxxxxxx>, <xen-devel@xxxxxxxxxxxxx>
  • From: Keir Fraser <keir@xxxxxxx>
  • Date: Fri, 01 Mar 2013 15:55:18 +0000
  • Cc: Xi Wang <xi@xxxxxxx>
  • Delivery-date: Fri, 01 Mar 2013 15:55:40 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>
  • Thread-index: Ac4WlSu7JH2BfAwetkaF5Sidmcrm1g==
  • Thread-topic: [Xen-devel] [PATCH] fix compat memory exchange op splitting

On 01/03/2013 12:07, "Jan Beulich" <JBeulich@xxxxxxxx> wrote:

> A shift with a negative count was erroneously used here, yielding
> undefined behavior.
> 
> Reported-by: Xi Wang <xi@xxxxxxx>
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

Acked-by: Keir Fraser <keir@xxxxxxx>

> --- 2013-02-21.orig/xen/common/compat/memory.c 2013-02-26 17:22:57.000000000
> +0100
> +++ 2013-02-21/xen/common/compat/memory.c 2013-03-01 13:01:22.000000000 +0100
> @@ -173,7 +173,7 @@ int compat_memory_op(unsigned int cmd, X
>                  if ( order_delta >= 0 )
>                      nat.xchg->out.nr_extents = end_extent >> order_delta;
>                  else
> -                    nat.xchg->out.nr_extents = end_extent << order_delta;
> +                    nat.xchg->out.nr_extents = end_extent << -order_delta;
>                  ++split;
>              }
>  
> 
> 
> 
> _______________________________________________
> 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®.