[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2] xen/vcpu: Rework sanity checks in vcpu_create()
On Tue, Sep 11, 2018 at 12:48 PM Andrew Cooper <andrew.cooper3@xxxxxxxxxx> wrote: > > Poisoning idle_vcpu[0] with the sanity debug value isn't actually a clever > idea, because it passes a NULL pointer check but isn't a usable vcpu. It is > also the reason for the (!is_idle_domain(d) || vcpu_id) part of the existing > sanity BUG_ON(). > > Now that d->max_vcpus is appropriately set up before vcpu_create() is called, > we can properly range check the requested vcpu_id. Drop the BUG_ON() and > replace it with code which is runtime safe but non-fatal. > > Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> > --- > CC: Jan Beulich <JBeulich@xxxxxxxx> > CC: Wei Liu <wei.liu2@xxxxxxxxxx> > CC: Roger Pau Monné <roger.pau@xxxxxxxxxx> > CC: Stefano Stabellini <sstabellini@xxxxxxxxxx> > CC: Julien Grall <julien.grall@xxxxxxx> > CC: Jason Andryuk <jandryuk@xxxxxxxxx> > > v2: > * Fix the tboot check following the un-poisioning of idle_vcpu[0] > * Exclude the idle domain from the next_in_list list, and vastly simplify the > linking logic. Reviewed-by: Jason Andryuk <jandryuk@xxxxxxxxx> _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |