[Crash-utility] [PATCH] Account for the changed type of the domain.vcpu field in Xen4
Petr Tesarik
ptesarik at suse.cz
Fri Jan 14 13:53:27 UTC 2011
Dne pátek 07 Leden 2011 20:18:29 Dave Anderson napsal(a):
> ----- Original Message -----
>
> > On Friday 07 of January 2011 16:27:55 Dave Anderson wrote:
> > > ----- Original Message -----
> > >
> > > > The 'vcpu' field changed from a fixed array to a pointer to an array.
> > > > Change xen_hyper_store_domain_context to account for this change.
> > >
> > > Presuming this tests OK on older hypervisor dumps, this looks OK.
> > > Queued for the next release based upon testing.
> >
> > Hi Dave,
> >
> > older Xen hypervisors didn't have the "max_vcpus" field in struct domain,
> > so there is in fact no change for them.
> >
> > However, thinking about it some more, this might be affected by the
> > increase of XEN_HYPER_MAX_VIRT_CPUS. Although I haven't seen a failure,
> > let me check first whether a crash session on a dump from Xen 3.3
> > attempts to read past array boundaries.
>
> As it turns out, my tests didn't work out on any of my sample hypervisor
> dumps, presumably due to this patch, the XEN_HYPER_MAX_VIRT_CPUS patch, or
> both (?).
Hi Dave,
yes, it's because of the XEN_HYPER_MAX_VIRT_CPUS. The vcpu field is declared
as:
struct vcpu *vcpu[MAX_VIRT_CPUS];
for Xen-3.3, but it is a pointer to a dynamically allocated array in Xen4. So,
this is exactly what I was afraid of, and crash reads past the array
boundaries in xen_hyper_store_domain_context.
OTOH I don't like the idea of hard-wiring the MAX_VIRT_CPUS constant in crash,
because it's one of the easiest tweaks one could do on the Xen kernel (well,
32 VCPUs isn't really much).
Let me see if I can find a better solution,
Petr
More information about the Crash-utility
mailing list