summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2015-09-14 13:36:29 +0000
committerjoerg <joerg@pkgsrc.org>2015-09-14 13:36:29 +0000
commit7e34886acebacbec9796f84152e68330d8f85333 (patch)
treea330efd97ba3ce08edb6e13de1d14625d2f38842 /sysutils
parent4553a7dc60437ea19c03ec974102f845a894902f (diff)
downloadpkgsrc-7e34886acebacbec9796f84152e68330d8f85333.tar.gz
Avoid undefined behavior when left-shifting negative values.
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/xenkernel41/distinfo3
-rw-r--r--sysutils/xenkernel41/patches/patch-xen_drivers_passthrough_vtd_x86_ats.c13
-rw-r--r--sysutils/xenkernel42/distinfo3
-rw-r--r--sysutils/xenkernel42/patches/patch-xen_drivers_passthrough_vtd_x86_ats.c22
-rw-r--r--sysutils/xenkernel45/distinfo4
-rw-r--r--sysutils/xenkernel45/patches/patch-xen_common_page__alloc.c13
-rw-r--r--sysutils/xenkernel45/patches/patch-xen_drivers_passthrough_vtd_x86_ats.c22
7 files changed, 77 insertions, 3 deletions
diff --git a/sysutils/xenkernel41/distinfo b/sysutils/xenkernel41/distinfo
index 56eff5e7d1c..a39bcd86d69 100644
--- a/sysutils/xenkernel41/distinfo
+++ b/sysutils/xenkernel41/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.36 2015/04/19 13:13:20 spz Exp $
+$NetBSD: distinfo,v 1.37 2015/09/14 13:36:29 joerg Exp $
SHA1 (xen-4.1.6.1.tar.gz) = e5f15feb0821578817a65ede16110c6eac01abd0
RMD160 (xen-4.1.6.1.tar.gz) = bff11421fc44a26f2cc3156713267abcb36d7a19
@@ -36,4 +36,5 @@ SHA1 (patch-xen_arch_x86_Rules.mk) = 6b9b4bfa28924f7d3f6c793a389f1a7ac9d228e2
SHA1 (patch-xen_arch_x86_cpu_mcheck_vmce.c) = 5afd01780a13654f1d21bf1562f6431c8370be0b
SHA1 (patch-xen_arch_x86_time.c) = 1611959c08ad79e3f042ac70c8d9d57b60225289
SHA1 (patch-xen_drivers_char_console_c) = 0fe186369602ccffaeec6f4bfbee8bb4298d3ff0
+SHA1 (patch-xen_drivers_passthrough_vtd_x86_ats.c) = 012ccbb27069c4f2e0361bd127397fdd22027f29
SHA1 (patch-xen_include_xen_stdarg.h) = e9df974a9b783ed442ab17497198432cb9844b70
diff --git a/sysutils/xenkernel41/patches/patch-xen_drivers_passthrough_vtd_x86_ats.c b/sysutils/xenkernel41/patches/patch-xen_drivers_passthrough_vtd_x86_ats.c
new file mode 100644
index 00000000000..40822684d39
--- /dev/null
+++ b/sysutils/xenkernel41/patches/patch-xen_drivers_passthrough_vtd_x86_ats.c
@@ -0,0 +1,13 @@
+$NetBSD: patch-xen_drivers_passthrough_vtd_x86_ats.c,v 1.1 2015/09/14 13:36:29 joerg Exp $
+
+--- xen/drivers/passthrough/vtd/x86/ats.c.orig 2015-09-13 15:34:59.000000000 +0000
++++ xen/drivers/passthrough/vtd/x86/ats.c
+@@ -286,7 +286,7 @@ int dev_invalidate_iotlb(struct iommu *i
+ case DMA_TLB_GLOBAL_FLUSH:
+ /* invalidate all translations: sbit=1,bit_63=0,bit[62:12]=1 */
+ sbit = 1;
+- addr = (~0 << PAGE_SHIFT_4K) & 0x7FFFFFFFFFFFFFFF;
++ addr = (~0ULL << PAGE_SHIFT_4K) & 0x7FFFFFFFFFFFFFFF;
+ ret |= qinval_device_iotlb(iommu, pdev->ats_queue_depth,
+ sid, sbit, addr);
+ break;
diff --git a/sysutils/xenkernel42/distinfo b/sysutils/xenkernel42/distinfo
index 5b3ea752929..8e5ed0faabd 100644
--- a/sysutils/xenkernel42/distinfo
+++ b/sysutils/xenkernel42/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.15 2015/08/23 16:17:12 spz Exp $
+$NetBSD: distinfo,v 1.16 2015/09/14 13:36:29 joerg Exp $
SHA1 (xen-4.2.5.tar.gz) = f42741e4ec174495ace70c4b17a6b9b0e60e798a
RMD160 (xen-4.2.5.tar.gz) = 7d4f7f1b32ee541d341a756b1f8da02816438d19
@@ -24,6 +24,7 @@ SHA1 (patch-xen_arch_x86_hvm_hvm.c) = b6bac1d466ba5bc276bc3aea9d4c9df37f2b9b0f
SHA1 (patch-xen_arch_x86_mm_shadow_common.c) = 89dce860cc6aef7d0ec31f3137616b592490e60a
SHA1 (patch-xen_arch_x86_x86_emulate_x86_emulate.c) = 8b906e762c8f94a670398b4e033d50a2fb012f0a
SHA1 (patch-xen_common_spinlock.c) = 06f06b5e9b098262ebaa8af0be4837005fb5b8b4
+SHA1 (patch-xen_drivers_passthrough_vtd_x86_ats.c) = 5ab0bb0d1fd63abf8ef8d1f073f83a5f1f9f159a
SHA1 (patch-xen_include_asm-arm_spinlock.h) = fe2e35a5ebec4c551df5d1680c93e6ad19348d93
SHA1 (patch-xen_include_asm-x86_atomic.h) = d406c6071ea3823c25113a801dd77ff32146d162
SHA1 (patch-xen_include_asm-x86_spinlock.h) = fbaaf264e9aa4857635a81b63c4a77cba4bf560f
diff --git a/sysutils/xenkernel42/patches/patch-xen_drivers_passthrough_vtd_x86_ats.c b/sysutils/xenkernel42/patches/patch-xen_drivers_passthrough_vtd_x86_ats.c
new file mode 100644
index 00000000000..9aa76cfb521
--- /dev/null
+++ b/sysutils/xenkernel42/patches/patch-xen_drivers_passthrough_vtd_x86_ats.c
@@ -0,0 +1,22 @@
+$NetBSD: patch-xen_drivers_passthrough_vtd_x86_ats.c,v 1.1 2015/09/14 13:36:29 joerg Exp $
+
+--- xen/drivers/passthrough/vtd/x86/ats.c.orig 2014-09-02 06:22:57.000000000 +0000
++++ xen/drivers/passthrough/vtd/x86/ats.c
+@@ -134,7 +134,7 @@ int dev_invalidate_iotlb(struct iommu *i
+ case DMA_TLB_GLOBAL_FLUSH:
+ /* invalidate all translations: sbit=1,bit_63=0,bit[62:12]=1 */
+ sbit = 1;
+- addr = (~0 << PAGE_SHIFT_4K) & 0x7FFFFFFFFFFFFFFF;
++ addr = (~0ULL << PAGE_SHIFT_4K) & 0x7FFFFFFFFFFFFFFF;
+ rc = qinval_device_iotlb(iommu, pdev->ats_queue_depth,
+ sid, sbit, addr);
+ break;
+@@ -146,7 +146,7 @@ int dev_invalidate_iotlb(struct iommu *i
+ sbit = size_order ? 1 : 0;
+
+ /* clear lower bits */
+- addr &= ~0 << PAGE_SHIFT_4K;
++ addr &= ~0ULL << PAGE_SHIFT_4K;
+
+ /* if sbit == 1, zero out size_order bit and set lower bits to 1 */
+ if ( sbit )
diff --git a/sysutils/xenkernel45/distinfo b/sysutils/xenkernel45/distinfo
index d4c308b93dc..4739dce4dc0 100644
--- a/sysutils/xenkernel45/distinfo
+++ b/sysutils/xenkernel45/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.8 2015/06/23 17:45:33 bouyer Exp $
+$NetBSD: distinfo,v 1.9 2015/09/14 13:36:29 joerg Exp $
SHA1 (xen-4.5.1.tar.gz) = f10328ce63625a5a7bfa3af5899c4432a467c051
RMD160 (xen-4.5.1.tar.gz) = 4c449d799e041a52a94c00ee43a8c28fd4af1b96
@@ -6,5 +6,7 @@ Size (xen-4.5.1.tar.gz) = 18410400 bytes
SHA1 (patch-Config.mk) = a2a104d023cea4e551a3ad40927d4884d6c610bf
SHA1 (patch-xen_Makefile) = 750d0c8d4fea14d3ef3f872de5242a1f5104cbbe
SHA1 (patch-xen_arch_x86_Rules.mk) = 7b0894ba7311edb02118a021671f304cf3872154
+SHA1 (patch-xen_common_page__alloc.c) = c4d606de1cada8cf89b5abd16efada3d58c68a03
+SHA1 (patch-xen_drivers_passthrough_vtd_x86_ats.c) = f72fd4bb2aeeaeb0b167031dfd5498e73666aa4e
SHA1 (patch-xen_include_asm-x86_current.h) = 8a21577be06383c0c7f53c15ba828f77fb6314ad
SHA1 (patch-xen_include_xen_lib.h) = 82a219b7d9c5deaa2b8e0adc774f60395adc4815
diff --git a/sysutils/xenkernel45/patches/patch-xen_common_page__alloc.c b/sysutils/xenkernel45/patches/patch-xen_common_page__alloc.c
new file mode 100644
index 00000000000..10b5940c0a4
--- /dev/null
+++ b/sysutils/xenkernel45/patches/patch-xen_common_page__alloc.c
@@ -0,0 +1,13 @@
+$NetBSD: patch-xen_common_page__alloc.c,v 1.1 2015/09/14 13:36:29 joerg Exp $
+
+--- xen/common/page_alloc.c.orig 2015-09-13 17:37:09.000000000 +0000
++++ xen/common/page_alloc.c
+@@ -1561,7 +1561,7 @@ void *alloc_xenheap_pages(unsigned int o
+ ASSERT(!in_irq());
+
+ if ( xenheap_bits && (memflags >> _MEMF_bits) > xenheap_bits )
+- memflags &= ~MEMF_bits(~0);
++ memflags &= ~MEMF_bits(~0U);
+ if ( !(memflags >> _MEMF_bits) )
+ memflags |= MEMF_bits(xenheap_bits);
+
diff --git a/sysutils/xenkernel45/patches/patch-xen_drivers_passthrough_vtd_x86_ats.c b/sysutils/xenkernel45/patches/patch-xen_drivers_passthrough_vtd_x86_ats.c
new file mode 100644
index 00000000000..f026086878d
--- /dev/null
+++ b/sysutils/xenkernel45/patches/patch-xen_drivers_passthrough_vtd_x86_ats.c
@@ -0,0 +1,22 @@
+$NetBSD: patch-xen_drivers_passthrough_vtd_x86_ats.c,v 1.1 2015/09/14 13:36:29 joerg Exp $
+
+--- xen/drivers/passthrough/vtd/x86/ats.c.orig 2015-06-22 13:41:35.000000000 +0000
++++ xen/drivers/passthrough/vtd/x86/ats.c
+@@ -134,7 +134,7 @@ int dev_invalidate_iotlb(struct iommu *i
+ case DMA_TLB_GLOBAL_FLUSH:
+ /* invalidate all translations: sbit=1,bit_63=0,bit[62:12]=1 */
+ sbit = 1;
+- addr = (~0 << PAGE_SHIFT_4K) & 0x7FFFFFFFFFFFFFFF;
++ addr = (~0ULL << PAGE_SHIFT_4K) & 0x7FFFFFFFFFFFFFFF;
+ rc = qinval_device_iotlb(iommu, pdev->ats_queue_depth,
+ sid, sbit, addr);
+ break;
+@@ -146,7 +146,7 @@ int dev_invalidate_iotlb(struct iommu *i
+ sbit = size_order ? 1 : 0;
+
+ /* clear lower bits */
+- addr &= ~0 << PAGE_SHIFT_4K;
++ addr &= ~0ULL << PAGE_SHIFT_4K;
+
+ /* if sbit == 1, zero out size_order bit and set lower bits to 1 */
+ if ( sbit )