Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Vlad Glagolev (efccb4483a2be35254c74fd5ad323bafb4bd5510)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Vlad Glagolev <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Vlad Glagolev (efccb4483a2be35254c74fd5ad323bafb4bd5510)
  • Date: Tue, 25 Jun 2013 07:45:14 -0500

GIT changes to master grimoire by Vlad Glagolev <stealth AT sourcemage.org>:

crypto/krb5/DETAILS | 6
crypto/krb5/HISTORY | 3
ftp/curl/DETAILS | 4
ftp/curl/HISTORY | 3
kernels/linux/HISTORY | 4
kernels/linux/info/patches/maintenance_patches_3/patch-3.0.83 | 5
kernels/linux/info/patches/maintenance_patches_3/patch-3.4.50 | 5
utils/xen/DETAILS | 4
utils/xen/HISTORY | 5
utils/xen/PRE_BUILD | 7
utils/xen/xsa-27-1.patch | 12
utils/xen/xsa-33.patch | 21
utils/xen/xsa-36.patch | 369
----------
utils/xen/xsa-38.patch | 73 -
utils/xen/xsa-41-1.patch | 41 -
utils/xen/xsa-41.patch | 46 -
16 files changed, 32 insertions(+), 576 deletions(-)

New commits:
commit efccb4483a2be35254c74fd5ad323bafb4bd5510
Author: Vlad Glagolev <stealth AT sourcemage.org>
Commit: Vlad Glagolev <stealth AT sourcemage.org>

linux: => 3.0.83 (lts)
(cherry picked from commit 4373e294029fc81d666ba3e432f19e99f881bcf6)

commit 29c400ddf746a60f72c8a0fafe88b756963ebe9b
Author: Vlad Glagolev <stealth AT sourcemage.org>
Commit: Vlad Glagolev <stealth AT sourcemage.org>

linux: => 3.4.50 (lts)
(cherry picked from commit ffccaa7de604cfe286ad5f4f3d200337834be860)

commit 77cae0a41d0f6ca52610d0f79a21f8eb94e92385
Author: Vlad Glagolev <stealth AT sourcemage.org>
Commit: Vlad Glagolev <stealth AT sourcemage.org>

curl: => 7.31.0 (security)

commit cc08fe1d8ccc4282a8d425c11c0916446e475ac3
Author: Vlad Glagolev <stealth AT sourcemage.org>
Commit: Vlad Glagolev <stealth AT sourcemage.org>

xen: => 4.1.5 (security)

commit 889e98f9ea300fbf87149567949e48fd1d4bba1a
Author: Vlad Glagolev <stealth AT sourcemage.org>
Commit: Vlad Glagolev <stealth AT sourcemage.org>

krb5: => 1.11.3 (security)

diff --git a/crypto/krb5/DETAILS b/crypto/krb5/DETAILS
index 9fd1267..c8964bd 100755
--- a/crypto/krb5/DETAILS
+++ b/crypto/krb5/DETAILS
@@ -1,6 +1,6 @@
SPELL=krb5
- VERSION=1.11.2
-
SOURCE_HASH=sha512:2db58530a98c4bdf9c6f797f3fb2881a3bdeda680804309f1f40e877a5a1c6e589021e1e0521b5a258626e5d04105ad0c01575b2104313b4b9592ee1ae8b8006
+ VERSION=1.11.3
+
SOURCE_HASH=sha512:4d4c5d5c3a495da141bca40fe73378db190ace8ed397b7bb8e38c53757e6df3ec55fa0eb5628f7c6204d1265f8451535e65c4ebd844821c64cdfd0c6e32468a5
VX=${VERSION%.?}
SOURCE=$SPELL-$VERSION-signed.tar
SOURCE_RAW=$SPELL-$VERSION.tar.gz
@@ -9,7 +9,7 @@ SOURCE_DIRECTORY=$BUILD_DIRECTORY/$SPELL-$VERSION
WEB_SITE=http://web.mit.edu/kerberos/www/
ENTERED=20020215

LICENSE[0]=http://web.mit.edu/kerberos/www/krb5-1.7/krb5-1.7/doc/krb5-install.html#Copyright
- SECURITY_PATCH=11
+ SECURITY_PATCH=12
KEYWORDS="security crypto"
SHORT="Kerberos 5 network security protocol"
cat << EOF
diff --git a/crypto/krb5/HISTORY b/crypto/krb5/HISTORY
index 3ab0f2d..42a2869 100644
--- a/crypto/krb5/HISTORY
+++ b/crypto/krb5/HISTORY
@@ -1,3 +1,6 @@
+2013-06-25 Vlad Glagolev <stealth AT sourcemage.org>
+ * DETAILS: updated spell to 1.11.3; SECURITY_PATCH++ (CVE-2002-2443)
+
2013-06-03 Treeve Jelbert <treeve AT sourcemage.org>
* DETAILS: version 1.11.2

diff --git a/ftp/curl/DETAILS b/ftp/curl/DETAILS
index 9e118f3..ac32339 100755
--- a/ftp/curl/DETAILS
+++ b/ftp/curl/DETAILS
@@ -1,6 +1,6 @@
SPELL=curl
- VERSION=7.30.0
- SECURITY_PATCH=9
+ VERSION=7.31.0
+ SECURITY_PATCH=10
SOURCE=$SPELL-$VERSION.tar.bz2
SOURCE2=$SOURCE.asc
SOURCE_DIRECTORY="$BUILD_DIRECTORY/$SPELL-$VERSION"
diff --git a/ftp/curl/HISTORY b/ftp/curl/HISTORY
index 41b2ead..df11b5a 100644
--- a/ftp/curl/HISTORY
+++ b/ftp/curl/HISTORY
@@ -1,3 +1,6 @@
+2013-06-25 Vlad Glagolev <stealth AT sourcemage.org>
+ * DETAILS: updated spell to 7.31.0; SECURITY_PATCH++ (CVE-2013-2174)
+
2013-05-10 Remko van der Vossen <wich AT sourcemage.org>
* BUILD: Remove all occurrences of -DPIC
Prefer pure bash solution over spawning grep
diff --git a/kernels/linux/HISTORY b/kernels/linux/HISTORY
index 7f8ed03..4db41e5 100644
--- a/kernels/linux/HISTORY
+++ b/kernels/linux/HISTORY
@@ -1,3 +1,7 @@
+2013-06-25 Vlad Glagolev <stealth AT sourcemage.org>
+ * info/patches/maintenance_patches_3/patch-3.4.50: added
+ * info/patches/maintenance_patches_3/patch-3.0.83: added
+
2013-06-20 Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
* latest.defaults: LATEST_maintenance_patches_3=patch-3.9.7
* info/patches/maintenance_patches_3/patch-3.9.7: added
diff --git a/kernels/linux/info/patches/maintenance_patches_3/patch-3.0.83
b/kernels/linux/info/patches/maintenance_patches_3/patch-3.0.83
new file mode 100755
index 0000000..062901c
--- /dev/null
+++ b/kernels/linux/info/patches/maintenance_patches_3/patch-3.0.83
@@ -0,0 +1,5 @@
+appliedkernels="3.0"
+patchversion="${appliedkernels}.83"
+source="patch-${patchversion}.bz2"
+source_url="${KERNEL_URL}/pub/linux/kernel/v3.0/${source}"
+sha1sum="f4d75387a697f9a6ca611eda06379cb4eaa45fe2"
diff --git a/kernels/linux/info/patches/maintenance_patches_3/patch-3.4.50
b/kernels/linux/info/patches/maintenance_patches_3/patch-3.4.50
new file mode 100755
index 0000000..f241dbe
--- /dev/null
+++ b/kernels/linux/info/patches/maintenance_patches_3/patch-3.4.50
@@ -0,0 +1,5 @@
+appliedkernels="3.4"
+patchversion="${appliedkernels}.50"
+source="patch-${patchversion}.bz2"
+source_url="${KERNEL_URL}/pub/linux/kernel/v3.x/${source}"
+sha1sum="2ac7bfac8ca49e9e05c5ab80f1a41ae70f9728de"
diff --git a/utils/xen/DETAILS b/utils/xen/DETAILS
index d6c6fb1..a86a167 100755
--- a/utils/xen/DETAILS
+++ b/utils/xen/DETAILS
@@ -1,6 +1,6 @@
SPELL=xen
- VERSION=4.1.4
- SECURITY_PATCH=7
+ VERSION=4.1.5
+ SECURITY_PATCH=8
SOURCE=${SPELL}-${VERSION}.tar.gz
SOURCE2=$SOURCE.sig
SOURCE2_IGNORE=signature
diff --git a/utils/xen/HISTORY b/utils/xen/HISTORY
index 06aa996..b4429d6 100644
--- a/utils/xen/HISTORY
+++ b/utils/xen/HISTORY
@@ -1,3 +1,8 @@
+2013-06-25 Vlad Glagolev <stealth AT sourcemage.org>
+ * DETAILS: updated spell to 4.1.5; SECURITY_PATCH++
+ * PRE_BUILD: removed patches
+ * xsa-*.patch: removed, fixed by upstream
+
2013-02-18 Vlad Glagolev <stealth AT sourcemage.org>
* DETAILS: SECURITY_PATCH++
* PRE_BUILD: apply patches
diff --git a/utils/xen/PRE_BUILD b/utils/xen/PRE_BUILD
index ba38b55..c7f9a4a 100755
--- a/utils/xen/PRE_BUILD
+++ b/utils/xen/PRE_BUILD
@@ -1,13 +1,6 @@
default_pre_build &&
cd ${SOURCE_DIRECTORY} &&

-patch -p1 < "$SPELL_DIRECTORY/xsa-27-1.patch" &&
-patch -p1 < "$SPELL_DIRECTORY/xsa-33.patch" &&
-patch -p1 < "$SPELL_DIRECTORY/xsa-36.patch" &&
-patch -p1 < "$SPELL_DIRECTORY/xsa-38.patch" &&
-patch -p1 < "$SPELL_DIRECTORY/xsa-41.patch" &&
-patch -p1 < "$SPELL_DIRECTORY/xsa-41-1.patch" &&
-
if [[ $XEN_UPINIT != y ]]; then
sedit "s:all install-initd:all:" tools/hotplug/Linux/Makefile
fi &&
diff --git a/utils/xen/xsa-27-1.patch b/utils/xen/xsa-27-1.patch
deleted file mode 100644
index 4260b20..0000000
--- a/utils/xen/xsa-27-1.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- a/xen/arch/x86/mm/paging.c Wed Jan 16 14:15:12 2013 +0000
-+++ b/xen/arch/x86/mm/paging.c Thu Jan 17 11:17:32 2013 +0000
-@@ -534,7 +534,8 @@ int paging_log_dirty_range(struct domain
-
- size = ((nr + BITS_PER_LONG - 1) / BITS_PER_LONG) * sizeof (long);
- rv = 0;
-- for ( off = 0; !rv && off < size; off += sizeof zeroes )
-+ off = 0;
-+ while ( !rv && off < size )
- {
- int todo = min(size - off, (int) PAGE_SIZE);
- if ( copy_to_guest_offset(dirty_bitmap, off, zeroes, todo) )
diff --git a/utils/xen/xsa-33.patch b/utils/xen/xsa-33.patch
deleted file mode 100644
index d0bdeb4..0000000
--- a/utils/xen/xsa-33.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-VT-d: fix interrupt remapping source validation for devices behind
-legacy bridges
-
-Using SVT_VERIFY_BUS here doesn't make sense; native Linux also
-uses SVT_VERIFY_SID_SQ here instead.
-
-This is XSA-33 / CVE-2012-5634.
-
-Signed-off-by: Jan Beulich <jbeulich AT suse.com>
-
---- a/xen/drivers/passthrough/vtd/intremap.c
-+++ b/xen/drivers/passthrough/vtd/intremap.c
-@@ -499,7 +499,7 @@ static void set_msi_source_id(struct pci_dev *pdev,
struct iremap_entry *ire)
- set_ire_sid(ire, SVT_VERIFY_BUS, SQ_ALL_16,
- (bus << 8) | pdev->bus);
- else if ( pdev_type(bus, devfn) == DEV_TYPE_LEGACY_PCI_BRIDGE )
-- set_ire_sid(ire, SVT_VERIFY_BUS, SQ_ALL_16,
-+ set_ire_sid(ire, SVT_VERIFY_SID_SQ, SQ_ALL_16,
- PCI_BDF2(bus, devfn));
- }
- break;
diff --git a/utils/xen/xsa-36.patch b/utils/xen/xsa-36.patch
deleted file mode 100644
index f4b15e2..0000000
--- a/utils/xen/xsa-36.patch
+++ /dev/null
@@ -1,369 +0,0 @@
-ACPI: acpi_table_parse() should return handler's error code
-
-Currently, the error code returned by acpi_table_parse()'s handler
-is ignored. This patch will propagate handler's return value to
-acpi_table_parse()'s caller.
-
-AMD,IOMMU: Clean up old entries in remapping tables when creating new
-interrupt mapping.
-
-When changing the affinity of an IRQ associated with a passed
-through PCI device, clear previous mapping.
-
-In addition, because some BIOSes may incorrectly program IVRS
-entries for IOAPIC try to check for entry's consistency. Specifically,
-if conflicting entries are found disable IOMMU if per-device
-remapping table is used. If entries refer to bogus IOAPIC IDs
-disable IOMMU unconditionally
-
-AMD,IOMMU: Disable IOMMU if SATA Combined mode is on
-
-AMD's SP5100 chipset can be placed into SATA Combined mode
-that may cause prevent dom0 from booting when IOMMU is
-enabled and per-device interrupt remapping table is used.
-While SP5100 erratum 28 requires BIOSes to disable this mode,
-some may still use it.
-
-This patch checks whether this mode is on and, if per-device
-table is in use, disables IOMMU.
-
-AMD,IOMMU: Make per-device interrupt remapping table default
-
-Using global interrupt remapping table may be insecure, as
-described by XSA-36. This patch makes per-device mode default.
-
-This is XSA-36 / CVE-2013-0153.
-
-Signed-off-by: Jan Beulich <jbeulich AT suse.com>
-Signed-off-by: Boris Ostrovsky <boris.ostrovsky AT amd.com>
-
---- a/xen/arch/x86/irq.c
-+++ b/xen/arch/x86/irq.c
-@@ -1677,9 +1677,6 @@ int map_domain_pirq(
- d->arch.pirq_irq[pirq] = irq;
- d->arch.irq_pirq[irq] = pirq;
- spin_unlock_irqrestore(&desc->lock, flags);
--
-- if ( opt_irq_vector_map == OPT_IRQ_VECTOR_MAP_PERDEV )
-- printk(XENLOG_INFO "Per-device vector maps for GSIs not
implemented yet.\n");
- }
-
- done:
---- a/xen/drivers/acpi/tables.c
-+++ b/xen/drivers/acpi/tables.c
-@@ -267,7 +267,7 @@ acpi_table_parse_madt(enum acpi_madt_typ
- * @handler: handler to run
- *
- * Scan the ACPI System Descriptor Table (STD) for a table matching @id,
-- * run @handler on it. Return 0 if table found, return on if not.
-+ * run @handler on it.
- */
- int acpi_table_parse(char *id, acpi_table_handler handler)
- {
-@@ -282,8 +282,7 @@ int acpi_table_parse(char *id, acpi_tabl
- acpi_get_table(id, 0, &table);
-
- if (table) {
-- handler(table);
-- return 0;
-+ return handler(table);
- } else
- return 1;
- }
---- a/xen/drivers/passthrough/amd/iommu_acpi.c
-+++ b/xen/drivers/passthrough/amd/iommu_acpi.c
-@@ -21,6 +21,7 @@
- #include <xen/config.h>
- #include <xen/errno.h>
- #include <asm/apicdef.h>
-+#include <asm/io_apic.h>
- #include <asm/amd-iommu.h>
- #include <asm/hvm/svm/amd-iommu-proto.h>
- #include <asm/hvm/svm/amd-iommu-acpi.h>
-@@ -29,7 +30,6 @@ extern unsigned long amd_iommu_page_entr
- extern unsigned short ivrs_bdf_entries;
- extern struct ivrs_mappings *ivrs_mappings;
- extern unsigned short last_bdf;
--extern int ioapic_bdf[MAX_IO_APICS];
- extern void *shared_intremap_table;
-
- static void add_ivrs_mapping_entry(
-@@ -636,6 +636,7 @@ static u16 __init parse_ivhd_device_spec
- u16 header_length, u16 block_length, struct amd_iommu *iommu)
- {
- u16 dev_length, bdf;
-+ int apic;
-
- dev_length = sizeof(struct acpi_ivhd_device_special);
- if ( header_length < (block_length + dev_length) )
-@@ -652,9 +653,58 @@ static u16 __init parse_ivhd_device_spec
- }
-
- add_ivrs_mapping_entry(bdf, bdf, ivhd_device->header.flags, iommu);
-- /* set device id of ioapic */
-- ioapic_bdf[ivhd_device->special.handle] = bdf;
-- return dev_length;
-+
-+ if ( ivhd_device->special.variety != 1 /* ACPI_IVHD_IOAPIC */ )
-+ {
-+ if ( ivhd_device->special.variety != 2 /* ACPI_IVHD_HPET */ )
-+ printk(XENLOG_ERR "Unrecognized IVHD special variety %#x\n",
-+ ivhd_device->special.variety);
-+ return dev_length;
-+ }
-+
-+ /*
-+ * Some BIOSes have IOAPIC broken entries so we check for IVRS
-+ * consistency here --- whether entry's IOAPIC ID is valid and
-+ * whether there are conflicting/duplicated entries.
-+ */
-+ for ( apic = 0; apic < nr_ioapics; apic++ )
-+ {
-+ if ( IO_APIC_ID(apic) != ivhd_device->special.handle )
-+ continue;
-+
-+ if ( ioapic_bdf[ivhd_device->special.handle].pin_setup )
-+ {
-+ if ( ioapic_bdf[ivhd_device->special.handle].bdf == bdf )
-+ AMD_IOMMU_DEBUG("IVHD Warning: Duplicate IO-APIC %#x
entries\n",
-+ ivhd_device->special.handle);
-+ else
-+ {
-+ printk(XENLOG_ERR "IVHD Error: Conflicting IO-APIC %#x
entries\n",
-+ ivhd_device->special.handle);
-+ if ( amd_iommu_perdev_intremap )
-+ return 0;
-+ }
-+ }
-+ else
-+ {
-+ /* set device id of ioapic */
-+ ioapic_bdf[ivhd_device->special.handle].bdf = bdf;
-+
-+ ioapic_bdf[ivhd_device->special.handle].pin_setup =
xzalloc_array(
-+ unsigned long, BITS_TO_LONGS(nr_ioapic_registers[apic]));
-+ if ( nr_ioapic_registers[apic] &&
-+ !ioapic_bdf[IO_APIC_ID(apic)].pin_setup )
-+ {
-+ printk(XENLOG_ERR "IVHD Error: Out of memory\n");
-+ return 0;
-+ }
-+ }
-+ return dev_length;
-+ }
-+
-+ printk(XENLOG_ERR "IVHD Error: Invalid IO-APIC %#x\n",
-+ ivhd_device->special.handle);
-+ return 0;
- }
-
- static int __init parse_ivhd_block(struct acpi_ivhd_block_header
*ivhd_block)
---- a/xen/drivers/passthrough/amd/iommu_init.c
-+++ b/xen/drivers/passthrough/amd/iommu_init.c
-@@ -897,12 +897,45 @@ static int __init amd_iommu_setup_device
- return 0;
- }
-
-+/* Check whether SP5100 SATA Combined mode is on */
-+static bool_t __init amd_sp5100_erratum28(void)
-+{
-+ u32 bus, id;
-+ u16 vendor_id, dev_id;
-+ u8 byte;
-+
-+ for (bus = 0; bus < 256; bus++)
-+ {
-+ id = pci_conf_read32(bus, 0x14, 0, PCI_VENDOR_ID);
-+
-+ vendor_id = id & 0xffff;
-+ dev_id = (id >> 16) & 0xffff;
-+
-+ /* SP5100 SMBus module sets Combined mode on */
-+ if (vendor_id != 0x1002 || dev_id != 0x4385)
-+ continue;
-+
-+ byte = pci_conf_read8(bus, 0x14, 0, 0xad);
-+ if ( (byte >> 3) & 1 )
-+ {
-+ printk(XENLOG_WARNING "AMD-Vi: SP5100 erratum 28 detected,
disabling IOMMU.\n"
-+ "If possible, disable SATA Combined mode in BIOS or
contact your vendor for BIOS update.\n");
-+ return 1;
-+ }
-+ }
-+
-+ return 0;
-+}
-+
- int __init amd_iommu_init(void)
- {
- struct amd_iommu *iommu;
-
- BUG_ON( !iommu_found() );
-
-+ if ( amd_iommu_perdev_intremap && amd_sp5100_erratum28() )
-+ goto error_out;
-+
- irq_to_iommu = xmalloc_array(struct amd_iommu *, nr_irqs);
- if ( irq_to_iommu == NULL )
- goto error_out;
---- a/xen/drivers/passthrough/amd/iommu_intr.c
-+++ b/xen/drivers/passthrough/amd/iommu_intr.c
-@@ -27,7 +27,7 @@
- #define INTREMAP_LENGTH 0xB
- #define INTREMAP_ENTRIES (1 << INTREMAP_LENGTH)
-
--int ioapic_bdf[MAX_IO_APICS];
-+struct ioapic_bdf ioapic_bdf[MAX_IO_APICS];
- extern struct ivrs_mappings *ivrs_mappings;
- extern unsigned short ivrs_bdf_entries;
- void *shared_intremap_table;
-@@ -117,12 +117,12 @@ void invalidate_interrupt_table(struct a
- static void update_intremap_entry_from_ioapic(
- int bdf,
- struct amd_iommu *iommu,
-- struct IO_APIC_route_entry *ioapic_rte)
-+ const struct IO_APIC_route_entry *rte,
-+ const struct IO_APIC_route_entry *old_rte)
- {
- unsigned long flags;
- u32* entry;
- u8 delivery_mode, dest, vector, dest_mode;
-- struct IO_APIC_route_entry *rte = ioapic_rte;
- int req_id;
- spinlock_t *lock;
- int offset;
-@@ -138,6 +138,14 @@ static void update_intremap_entry_from_i
- spin_lock_irqsave(lock, flags);
-
- offset = get_intremap_offset(vector, delivery_mode);
-+ if ( old_rte )
-+ {
-+ int old_offset = get_intremap_offset(old_rte->vector,
-+ old_rte->delivery_mode);
-+
-+ if ( offset != old_offset )
-+ free_intremap_entry(bdf, old_offset);
-+ }
- entry = (u32*)get_intremap_entry(req_id, offset);
- update_intremap_entry(entry, vector, delivery_mode, dest_mode, dest);
-
-@@ -176,7 +184,7 @@ int __init amd_iommu_setup_ioapic_remapp
- continue;
-
- /* get device id of ioapic devices */
-- bdf = ioapic_bdf[IO_APIC_ID(apic)];
-+ bdf = ioapic_bdf[IO_APIC_ID(apic)].bdf;
- iommu = find_iommu_for_device(bdf);
- if ( !iommu )
- {
-@@ -207,6 +215,7 @@ int __init amd_iommu_setup_ioapic_remapp
- flush_command_buffer(iommu);
- spin_unlock_irqrestore(&iommu->lock, flags);
- }
-+ set_bit(pin, ioapic_bdf[IO_APIC_ID(apic)].pin_setup);
- }
- }
- return 0;
-@@ -218,6 +227,7 @@ void amd_iommu_ioapic_update_ire(
- struct IO_APIC_route_entry old_rte = { 0 };
- struct IO_APIC_route_entry new_rte = { 0 };
- unsigned int rte_lo = (reg & 1) ? reg - 1 : reg;
-+ unsigned int pin = (reg - 0x10) / 2;
- int saved_mask, bdf;
- struct amd_iommu *iommu;
-
-@@ -228,7 +238,7 @@ void amd_iommu_ioapic_update_ire(
- }
-
- /* get device id of ioapic devices */
-- bdf = ioapic_bdf[IO_APIC_ID(apic)];
-+ bdf = ioapic_bdf[IO_APIC_ID(apic)].bdf;
- iommu = find_iommu_for_device(bdf);
- if ( !iommu )
- {
-@@ -254,6 +264,14 @@ void amd_iommu_ioapic_update_ire(
- *(((u32 *)&new_rte) + 1) = value;
- }
-
-+ if ( new_rte.mask &&
-+ !test_bit(pin, ioapic_bdf[IO_APIC_ID(apic)].pin_setup) )
-+ {
-+ ASSERT(saved_mask);
-+ __io_apic_write(apic, reg, value);
-+ return;
-+ }
-+
- /* mask the interrupt while we change the intremap table */
- if ( !saved_mask )
- {
-@@ -262,7 +280,11 @@ void amd_iommu_ioapic_update_ire(
- }
-
- /* Update interrupt remapping entry */
-- update_intremap_entry_from_ioapic(bdf, iommu, &new_rte);
-+ update_intremap_entry_from_ioapic(
-+ bdf, iommu, &new_rte,
-+ test_and_set_bit(pin,
-+ ioapic_bdf[IO_APIC_ID(apic)].pin_setup) ? &old_rte
-+ : NULL);
-
- /* Forward write access to IO-APIC RTE */
- __io_apic_write(apic, reg, value);
-@@ -373,6 +395,12 @@ void amd_iommu_msi_msg_update_ire(
- return;
- }
-
-+ if ( msi_desc->remap_index >= 0 )
-+ update_intremap_entry_from_msi_msg(iommu, pdev, msi_desc, NULL);
-+
-+ if ( !msg )
-+ return;
-+
- update_intremap_entry_from_msi_msg(iommu, pdev, msi_desc, msg);
- }
-
---- a/xen/drivers/passthrough/amd/pci_amd_iommu.c
-+++ b/xen/drivers/passthrough/amd/pci_amd_iommu.c
-@@ -195,6 +195,8 @@ int __init amd_iov_detect(void)
- {
- printk("AMD-Vi: Not overriding irq_vector_map setting\n");
- }
-+ if ( !amd_iommu_perdev_intremap )
-+ printk(XENLOG_WARNING "AMD-Vi: Using global interrupt remap table
is not recommended (see XSA-36)!\n");
- return scan_pci_devices();
- }
-
---- a/xen/drivers/passthrough/iommu.c
-+++ b/xen/drivers/passthrough/iommu.c
-@@ -49,7 +49,7 @@ bool_t __read_mostly iommu_qinval = 1;
- bool_t __read_mostly iommu_intremap = 1;
- bool_t __read_mostly iommu_hap_pt_share;
- bool_t __read_mostly amd_iommu_debug;
--bool_t __read_mostly amd_iommu_perdev_intremap;
-+bool_t __read_mostly amd_iommu_perdev_intremap = 1;
-
- static void __init parse_iommu_param(char *s)
- {
-@@ -78,6 +78,8 @@ static void __init parse_iommu_param(cha
- amd_iommu_debug = 1;
- else if ( !strcmp(s, "amd-iommu-perdev-intremap") )
- amd_iommu_perdev_intremap = 1;
-+ else if ( !strcmp(s, "amd-iommu-global-intremap") )
-+ amd_iommu_perdev_intremap = 0;
- else if ( !strcmp(s, "dom0-passthrough") )
- iommu_passthrough = 1;
- else if ( !strcmp(s, "dom0-strict") )
---- a/xen/include/asm-x86/hvm/svm/amd-iommu-proto.h
-+++ b/xen/include/asm-x86/hvm/svm/amd-iommu-proto.h
-@@ -88,6 +88,11 @@ void amd_iommu_read_msi_from_ire(
- unsigned int amd_iommu_read_ioapic_from_ire(
- unsigned int apic, unsigned int reg);
-
-+extern struct ioapic_bdf {
-+ u16 bdf;
-+ unsigned long *pin_setup;
-+} ioapic_bdf[];
-+
- /* power management support */
- void amd_iommu_resume(void);
- void amd_iommu_suspend(void);
diff --git a/utils/xen/xsa-38.patch b/utils/xen/xsa-38.patch
deleted file mode 100644
index f4a5dc0..0000000
--- a/utils/xen/xsa-38.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-diff --git a/tools/ocaml/libs/xb/partial.ml b/tools/ocaml/libs/xb/partial.ml
-index 3558889..d4d1c7b 100644
---- a/tools/ocaml/libs/xb/partial.ml
-+++ b/tools/ocaml/libs/xb/partial.ml
-@@ -27,8 +27,15 @@ external header_size: unit -> int = "stub_header_size"
- external header_of_string_internal: string -> int * int * int * int
- = "stub_header_of_string"
-
-+let xenstore_payload_max = 4096 (* xen/include/public/io/xs_wire.h *)
-+
- let of_string s =
- let tid, rid, opint, dlen = header_of_string_internal s in
-+ (* A packet which is bigger than xenstore_payload_max is illegal.
-+ This will leave the guest connection is a bad state and will
-+ be hard to recover from without restarting the connection
-+ (ie rebooting the guest) *)
-+ let dlen = min xenstore_payload_max dlen in
- {
- tid = tid;
- rid = rid;
-@@ -38,6 +45,7 @@ let of_string s =
- }
-
- let append pkt s sz =
-+ if pkt.len > 4096 then failwith "Buffer.add: cannot grow buffer";
- Buffer.add_string pkt.buf (String.sub s 0 sz)
-
- let to_complete pkt =
-diff --git a/tools/ocaml/libs/xb/xs_ring_stubs.c
b/tools/ocaml/libs/xb/xs_ring_stubs.c
-index 00414c5..4888ac5 100644
---- a/tools/ocaml/libs/xb/xs_ring_stubs.c
-+++ b/tools/ocaml/libs/xb/xs_ring_stubs.c
-@@ -39,21 +39,23 @@ static int xs_ring_read(struct mmap_interface *interface,
- char *buffer, int len)
- {
- struct xenstore_domain_interface *intf = interface->addr;
-- XENSTORE_RING_IDX cons, prod;
-+ XENSTORE_RING_IDX cons, prod; /* offsets only */
- int to_read;
-
-- cons = intf->req_cons;
-- prod = intf->req_prod;
-+ cons = *(volatile uint32*)&intf->req_cons;
-+ prod = *(volatile uint32*)&intf->req_prod;
- xen_mb();
-+ cons = MASK_XENSTORE_IDX(cons);
-+ prod = MASK_XENSTORE_IDX(prod);
- if (prod == cons)
- return 0;
-- if (MASK_XENSTORE_IDX(prod) > MASK_XENSTORE_IDX(cons))
-+ if (prod > cons)
- to_read = prod - cons;
- else
-- to_read = XENSTORE_RING_SIZE - MASK_XENSTORE_IDX(cons);
-+ to_read = XENSTORE_RING_SIZE - cons;
- if (to_read < len)
- len = to_read;
-- memcpy(buffer, intf->req + MASK_XENSTORE_IDX(cons), len);
-+ memcpy(buffer, intf->req + cons, len);
- xen_mb();
- intf->req_cons += len;
- return len;
-@@ -66,8 +68,8 @@ static int xs_ring_write(struct mmap_interface *interface,
- XENSTORE_RING_IDX cons, prod;
- int can_write;
-
-- cons = intf->rsp_cons;
-- prod = intf->rsp_prod;
-+ cons = *(volatile uint32*)&intf->rsp_cons;
-+ prod = *(volatile uint32*)&intf->rsp_prod;
- xen_mb();
- if ( (prod - cons) >= XENSTORE_RING_SIZE )
- return 0;
diff --git a/utils/xen/xsa-41-1.patch b/utils/xen/xsa-41-1.patch
deleted file mode 100644
index 4ca750b..0000000
--- a/utils/xen/xsa-41-1.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 2c0331f4f7d241995452b99afaf0aab00493334a Mon Sep 17 00:00:00 2001
-From: Michael Contreras <michael AT inetric.com>
-Date: Wed, 5 Dec 2012 13:31:30 -0500
-Subject: [PATCH] e1000: Discard oversized packets based on SBP|LPE
-
-Discard packets longer than 16384 when !SBP to match the hardware behavior.
-
-Signed-off-by: Michael Contreras <michael AT inetric.com>
-Signed-off-by: Stefan Hajnoczi <stefanha AT redhat.com>
----
- hw/e1000.c | 7 +++++--
- 1 files changed, 5 insertions(+), 2 deletions(-)
-
-diff --git a/hw/e1000.c b/hw/e1000.c
-index 92fb00a..8fd1654 100644
---- a/tools/ioemu-qemu-xen/hw/e1000.c
-+++ b/tools/ioemu-qemu-xen/hw/e1000.c
-@@ -61,6 +61,8 @@ static int debugflags = DBGBIT(TXERR) | DBGBIT(GENERAL);
-
- /* this is the size past which hardware will drop packets when setting
LPE=0 */
- #define MAXIMUM_ETHERNET_VLAN_SIZE 1522
-+/* this is the size past which hardware will drop packets when setting
LPE=1 */
-+#define MAXIMUM_ETHERNET_LPE_SIZE 16384
-
- /*
- * HW models:
-@@ -809,8 +811,9 @@ e1000_receive(NetClientState *nc, const uint8_t *buf,
size_t size)
- }
-
- /* Discard oversized packets if !LPE and !SBP. */
-- if (size > MAXIMUM_ETHERNET_VLAN_SIZE
-- && !(s->mac_reg[RCTL] & E1000_RCTL_LPE)
-+ if ((size > MAXIMUM_ETHERNET_LPE_SIZE ||
-+ (size > MAXIMUM_ETHERNET_VLAN_SIZE
-+ && !(s->mac_reg[RCTL] & E1000_RCTL_LPE)))
- && !(s->mac_reg[RCTL] & E1000_RCTL_SBP)) {
- return size;
- }
---
-1.7.0.4
-
diff --git a/utils/xen/xsa-41.patch b/utils/xen/xsa-41.patch
deleted file mode 100644
index 64f60c5..0000000
--- a/utils/xen/xsa-41.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From b0d9ffcd0251161c7c92f94804dcf599dfa3edeb Mon Sep 17 00:00:00 2001
-From: Michael Contreras <michael AT inetric.com>
-Date: Sun, 2 Dec 2012 20:11:22 -0800
-Subject: [PATCH] e1000: Discard packets that are too long if !SBP and !LPE
-
-The e1000_receive function for the e1000 needs to discard packets longer than
-1522 bytes if the SBP and LPE flags are disabled. The linux driver assumes
-this behavior and allocates memory based on this assumption.
-
-Signed-off-by: Michael Contreras <michael AT inetric.com>
-Signed-off-by: Anthony Liguori <aliguori AT us.ibm.com>
----
- hw/e1000.c | 10 ++++++++++
- 1 files changed, 10 insertions(+), 0 deletions(-)
-
-diff --git a/hw/e1000.c b/hw/e1000.c
-index cb7e7e8..5537ad2 100644
---- a/tools/ioemu-qemu-xen/hw/e1000.c
-+++ b/tools/ioemu-qemu-xen/hw/e1000.c
-@@ -59,6 +59,9 @@ static int debugflags = DBGBIT(TXERR) | DBGBIT(GENERAL);
- #define PNPMMIO_SIZE 0x20000
- #define MIN_BUF_SIZE 60 /* Min. octets in an ethernet frame sans FCS */
-
-+/* this is the size past which hardware will drop packets when setting
LPE=0 */
-+#define MAXIMUM_ETHERNET_VLAN_SIZE 1522
-+
- /*
- * HW models:
- * E1000_DEV_ID_82540EM works with Windows and Linux
-@@ -805,6 +808,13 @@ e1000_receive(NetClientState *nc, const uint8_t *buf,
size_t size)
- size = sizeof(min_buf);
- }
-
-+ /* Discard oversized packets if !LPE and !SBP. */
-+ if (size > MAXIMUM_ETHERNET_VLAN_SIZE
-+ && !(s->mac_reg[RCTL] & E1000_RCTL_LPE)
-+ && !(s->mac_reg[RCTL] & E1000_RCTL_SBP)) {
-+ return size;
-+ }
-+
- if (!receive_filter(s, buf, size))
- return size;
-
---
-1.7.0.4
-



  • [SM-Commit] GIT changes to master grimoire by Vlad Glagolev (efccb4483a2be35254c74fd5ad323bafb4bd5510), Vlad Glagolev, 06/25/2013

Archive powered by MHonArc 2.6.24.

Top of Page