You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/app-emulation/xen/files/xen-4.3-XSA-87.patch

24 lines
916 B

x86: PHYSDEVOP_{prepare,release}_msix are privileged
Yet this wasn't being enforced.
This is XSA-87.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
--- 2014-01-14.orig/xen/arch/x86/physdev.c 2013-11-18 11:03:37.000000000 +0100
+++ 2014-01-14/xen/arch/x86/physdev.c 2014-01-22 12:47:47.000000000 +0100
@@ -640,7 +640,10 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_H
if ( copy_from_guest(&dev, arg, 1) )
ret = -EFAULT;
else
- ret = pci_prepare_msix(dev.seg, dev.bus, dev.devfn,
+ ret = xsm_resource_setup_pci(XSM_PRIV,
+ (dev.seg << 16) | (dev.bus << 8) |
+ dev.devfn) ?:
+ pci_prepare_msix(dev.seg, dev.bus, dev.devfn,
cmd != PHYSDEVOP_prepare_msix);
break;
}