xen/23505-x86-cpu-add-arg-check.patch
Charles Arnold 1b78387def - fate#309893: Add Xen support for AMD family 15h processors
- fate#309901: Add Xen support for SVM TSC scaling in AMD family 
  15h
- fate#311951: Ivy Bridge: XEN support for Supervisor Mode 
  Execution Protection (SMEP) 
  23437-amd-fam15-TSC-scaling.patch
  23462-libxc-cpu-feature.patch
  23481-x86-SMEP.patch
  23504-x86-SMEP-hvm.patch
  23505-x86-cpu-add-arg-check.patch
  23508-vmx-proc-based-ctls-probe.patch
  23510-hvm-cpuid-DRNG.patch
  23511-amd-fam15-no-flush-for-C3.patch
  23516-cpuid-ERMS.patch
  23538-hvm-pio-emul-no-host-crash.patch
  23539-hvm-cpuid-FSGSBASE.patch
  23543-x86_64-maddr_to_virt-assertion.patch
  23546-fucomip.patch

- Fix libxc reentrancy issues
  23383-libxc-rm-static-vars.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=128
2011-06-17 16:45:46 +00:00

25 lines
824 B
Diff

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1307689724 -3600
# Node ID 5a557fda70a99d287735b53957e865c8dac0e351
# Parent c34604d5a29336d902837542b915d3b09b27a361
x86: Fix argument checking in (privileged) function cpu_add().
Thanks to John McDermott <john.mcdermott@nrl.navy.mil> for spotting.
Signed-off-by: Keir Fraser <keir@xen.org>
--- a/xen/arch/x86/smpboot.c
+++ b/xen/arch/x86/smpboot.c
@@ -899,7 +899,9 @@ int cpu_add(uint32_t apic_id, uint32_t a
dprintk(XENLOG_DEBUG, "cpu_add apic_id %x acpi_id %x pxm %x\n",
apic_id, acpi_id, pxm);
- if ( acpi_id > MAX_MADT_ENTRIES || apic_id > MAX_APICS || pxm > 256 )
+ if ( (acpi_id >= MAX_MADT_ENTRIES) ||
+ (apic_id >= MAX_APICS) ||
+ (pxm >= 256) )
return -EINVAL;
if ( !cpu_hotplug_begin() )