WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

RE: [Xen-devel] [PATCH][cpufreq] add bounds checking for getcpuidletime

To: "Keir Fraser" <Keir.Fraser@xxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: RE: [Xen-devel] [PATCH][cpufreq] add bounds checking for getcpuidletime
From: "Langsdorf, Mark" <mark.langsdorf@xxxxxxx>
Date: Tue, 4 Dec 2007 10:51:51 -0600
Delivery-date: Tue, 04 Dec 2007 08:57:15 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C37AF03E.195D2%Keir.Fraser@xxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <200712031048.42551.mark.langsdorf@xxxxxxx> <C37AF03E.195D2%Keir.Fraser@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acg2bEwHilp72KJfEdy0zwAX8io7RQAKZoQg
Thread-topic: [Xen-devel] [PATCH][cpufreq] add bounds checking for getcpuidletime
16519 fixes my problem.  Thanks!

-Mark Langsdorf
Operating System Research Center
AMD 

> -----Original Message-----
> From: Keir Fraser [mailto:Keir.Fraser@xxxxxxxxxxxx] 
> Sent: Tuesday, December 04, 2007 5:54 AM
> To: Langsdorf, Mark; xen-devel@xxxxxxxxxxxxxxxxxxx
> Subject: Re: [Xen-devel] [PATCH][cpufreq] add bounds checking 
> for getcpuidletime
> 
> This is supposed to be handled by xenctl_cpumap_to_cpumask, 
> but it looks
> like it's buggy. I checked in a fix as changeset 16519. Can 
> you please try
> with that and see if it fixes your problem?
> 
>  -- Keir
> 
> On 3/12/07 16:48, "Mark Langsdorf" <mark.langsdorf@xxxxxxx> wrote:
> 
> > The Xen platform hypercall for getting the cpu idletime does not
> > check to make sure that all cpus in the map have indexes less
> > than the size of the array that it writes the data into.  Add
> > bounds checking to avoid memory corruption.
> > 
> > Signed-off-by: Mark Langsdorf <mark.langsdorf@xxxxxxx>
> > 
> > diff -r d40788f07a4f xen/arch/x86/platform_hypercall.c
> > --- a/xen/arch/x86/platform_hypercall.c Sun Nov 25 12:43:13 
> 2007 +0000
> > +++ b/xen/arch/x86/platform_hypercall.c Mon Dec 03 10:25:23 
> 2007 -0600
> > @@ -326,6 +326,9 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe
> >                  cpu_clear(cpu, cpumap);
> >              }
> >  
> > +            if (cpu >= ctlmap.nr_cpus)
> > +                continue;
> > +
> >              ret = -EFAULT;
> >              if ( copy_to_guest_offset(idletimes, cpu, 
> &idletime, 1) )
> >                  goto out;
> > 
> > 
> > 
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel@xxxxxxxxxxxxxxxxxxx
> > http://lists.xensource.com/xen-devel
> 
> 
> 
> 
> 



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>