Gentoo Archives: gentoo-commits

From: Ian Delaney <della5@×××××××××.au>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/virtualization:master commit in: app-emulation/, app-emulation/files/
Date: Mon, 28 Nov 2011 18:15:50
Message-Id: c244b7f951108b31b51a20b2bcd2f0cffff4d86d.ian_delaney@gentoo
1 commit: c244b7f951108b31b51a20b2bcd2f0cffff4d86d
2 Author: Ian Delaney <idell5 <AT> iinet <DOT> com <DOT> au>
3 AuthorDate: Mon Nov 28 18:12:22 2011 +0000
4 Commit: Ian Delaney <della5 <AT> iinet <DOT> com <DOT> au>
5 CommitDate: Mon Nov 28 18:12:22 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/virtualization.git;a=commit;h=c244b7f9
7
8 Bumped xen-tools, xen to EAPI4
9
10 (Portage version: 2.1.10.11/git/Linux x86_64, unsigned Manifest commit)
11
12 ---
13 app-emulation/files/Manifest | 7 -
14 .../files/xen-3.3.0-unexported-target-fix.patch | 21 -
15 app-emulation/files/xen-3.4.2-CVE-2011-1583.patch | 87 ----
16 .../xen-3.4.2-dump_registers-watchdog-fix.patch | 19 -
17 .../files/xen-3.4.2-fix-__addr_ok-limit.patch | 101 -----
18 app-emulation/files/xen-3.4.2-no-DMA.patch | 71 ----
19 app-emulation/files/xen-3.4.2-werror-idiocy.patch | 429 --------------------
20 app-emulation/files/xen-4.1.1-iommu_sec_fix.patch | 74 ----
21 app-emulation/metadata.xml | 15 -
22 app-emulation/xen-3.4.2-r4.ebuild | 114 ------
23 app-emulation/xen-4.1.1-r2.ebuild | 121 ------
24 app-emulation/xen-9999.ebuild | 117 ------
25 12 files changed, 0 insertions(+), 1176 deletions(-)
26
27 diff --git a/app-emulation/files/Manifest b/app-emulation/files/Manifest
28 deleted file mode 100644
29 index 236346a..0000000
30 --- a/app-emulation/files/Manifest
31 +++ /dev/null
32 @@ -1,7 +0,0 @@
33 -MISC xen-3.3.0-unexported-target-fix.patch 788 RMD160 4b30444c021479cbd3969493639533fc1e43e781 SHA1 9119f06b4a005c385ac27e085e2d96ccf9cd4dc9 SHA256 e46f5fbe4c579b84f895f0ac6e05589553a11305ca30e69405082d58abd9ee07
34 -MISC xen-3.4.2-CVE-2011-1583.patch 2893 RMD160 c6ae9661202dafc2abdcf3aaf939464d14ded9fd SHA1 b2140fe7d615b542a96dadaaf8ace382e528d2cb SHA256 809c1744aee7569db31e9959c1e2c433ef6f4067134b26f70a689e056a024df9
35 -MISC xen-3.4.2-dump_registers-watchdog-fix.patch 533 RMD160 766249003d91cbec3b0014a8446e1a4d01cd847a SHA1 6306250671976c638f814a4958211af4bacb53b4 SHA256 17d18f268efd302085bdfa0673e2d9478e84206b6d060d0a63854441233a81c6
36 -MISC xen-3.4.2-fix-__addr_ok-limit.patch 3380 RMD160 8b8104a370847c1c148255855901b9dd32e6c888 SHA1 e3dd5cfda2410917b0844dff999ccbee2463ccb4 SHA256 dab6954da3cbf7592a36a6234561174d0d117711b87c0868d17f9d21af75a835
37 -MISC xen-3.4.2-no-DMA.patch 2708 RMD160 9aa83e21e8b07feca1f799f9efb4f9cd5728c6c6 SHA1 e55fa5a04203470af68452762f919b402854fce9 SHA256 87a3fe134b8d3c762d4d229986ccb77898a603a18974f453cfdf6ba9d68fe982
38 -MISC xen-3.4.2-werror-idiocy.patch 16826 RMD160 14f4678c723fd9241c88786b5b07a8c25252ce6f SHA1 f15d3c4d37b9c11fed49c025de2eaeb6911845a1 SHA256 261ef6541736f1df757476590bb8581cac376c9408e5041e8356336e13025c67
39 -MISC xen-4.1.1-iommu_sec_fix.patch 2851 RMD160 4367178c10cdc1e752f3e9ffb70f42e6e7179242 SHA1 8487f85dbf81bf245deaccca5ff5b8f46e60d112 SHA256 3a0ab3cb5c18db91f4be457cbba36189a558da7b794e1a35795f4fed3d48a7c8
40
41 diff --git a/app-emulation/files/xen-3.3.0-unexported-target-fix.patch b/app-emulation/files/xen-3.3.0-unexported-target-fix.patch
42 deleted file mode 100644
43 index 89f91a4..0000000
44 --- a/app-emulation/files/xen-3.3.0-unexported-target-fix.patch
45 +++ /dev/null
46 @@ -1,21 +0,0 @@
47 -diff -Nru a/tools/ioemu-qemu-xen/xen-setup b/tools/ioemu-qemu-xen/xen-setup
48 ---- a/tools/ioemu-qemu-xen/xen-setup 2008-08-22 17:56:41.000000000 +0800
49 -+++ b/tools/ioemu-qemu-xen/xen-setup 2009-02-20 10:55:37.000000000 +0800
50 -@@ -3,6 +3,8 @@
51 -
52 - # git-clean -x -d && ./xen-setup && make prefix=/usr CMDLINE_CFLAGS='-O0 -g' -j4 && make install DESTDIR=`pwd`/dist/ prefix=/usr && rsync -a --stats --delete . thule:shadow/qemu-iwj.git/ && rsync -a --stats dist/. root@thule:/
53 -
54 -+target=i386-dm
55 -+
56 - rm -f $target/Makefile
57 - rm -f $target/config.mak
58 - rm -f config-host.mak
59 -@@ -11,8 +13,6 @@
60 -
61 - ./configure --disable-gfx-check --disable-gcc-check --disable-curses --disable-slirp "$@" --prefix=/usr
62 -
63 --target=i386-dm
64 --
65 - if [ "x$XEN_ROOT" != x ]; then
66 - echo "XEN_ROOT=$XEN_ROOT" >>config-host.mak
67 - fi
68
69 diff --git a/app-emulation/files/xen-3.4.2-CVE-2011-1583.patch b/app-emulation/files/xen-3.4.2-CVE-2011-1583.patch
70 deleted file mode 100644
71 index f5cec4d..0000000
72 --- a/app-emulation/files/xen-3.4.2-CVE-2011-1583.patch
73 +++ /dev/null
74 @@ -1,87 +0,0 @@
75 ---- tools/libxc/xc_dom_bzimageloader.c 2009-11-10 23:12:56.000000000 +0800
76 -+++ tools/libxc/xc_dom_bzimageloader.c 2011-10-09 20:10:08.972815311 +0800
77 -@@ -308,19 +308,19 @@
78 -
79 - extern struct xc_dom_loader elf_loader;
80 -
81 --static unsigned int payload_offset(struct setup_header *hdr)
82 -+static int check_magic(struct xc_dom_image *dom, const void *magic, size_t len)
83 - {
84 -- unsigned int off;
85 -+ if (len > dom->kernel_size)
86 -+ return 0;
87 -+
88 -+ return (memcmp(dom->kernel_blob, magic, len) == 0);
89 -+ }
90 -
91 -- off = (hdr->setup_sects + 1) * 512;
92 -- off += hdr->payload_offset;
93 -- return off;
94 --}
95 --
96 --static int xc_dom_probe_bzimage_kernel(struct xc_dom_image *dom)
97 -+static int check_bzimage_kernel(struct xc_dom_image *dom, int verbose)
98 - {
99 - struct setup_header *hdr;
100 -- int ret;
101 -+ uint64_t payload_offset, payload_length;
102 -+ /* int ret; */
103 -
104 - if ( dom->kernel_blob == NULL )
105 - {
106 -@@ -352,20 +352,47 @@
107 - return -EINVAL;
108 - }
109 -
110 -- dom->kernel_blob = dom->kernel_blob + payload_offset(hdr);
111 -- dom->kernel_size = hdr->payload_length;
112 -+ /* upcast to 64 bits to avoid overflow */
113 -+ /* setup_sects is u8 and so cannot overflow */
114 -+ payload_offset = (hdr->setup_sects + 1) * 512;
115 -+ payload_offset += hdr->payload_offset;
116 -+ payload_length = hdr->payload_length;
117 -
118 -- if ( memcmp(dom->kernel_blob, "\037\213", 2) == 0 )
119 -- {
120 -+/* if ( memcmp(dom->kernel_blob, "\037\213", 2) == 0 )
121 -+ {
122 - ret = xc_dom_try_gunzip(dom, &dom->kernel_blob, &dom->kernel_size);
123 -- if ( ret == -1 )
124 -+ if ( ret == -1 ) */
125 -+ if ( payload_offset >= dom->kernel_size )
126 -+ {
127 -+ xc_dom_panic(XC_INVALID_KERNEL, "%s: payload offset overflow",
128 -+ __FUNCTION__);
129 -+ return -EINVAL;
130 -+ }
131 -+ if ( (payload_offset + payload_length) > dom->kernel_size )
132 -+ {
133 -+ xc_dom_panic(XC_INVALID_KERNEL, "%s: payload length overflow",
134 -+ __FUNCTION__);
135 -+ }
136 -+
137 -+ dom->kernel_blob = dom->kernel_blob + payload_offset;
138 -+ dom->kernel_size = payload_length;
139 -+
140 -+ if ( check_magic(dom, "\037\213", 2) )
141 -+ {
142 -+ if ( xc_dom_try_gunzip(dom, &dom->kernel_blob, &dom->kernel_size) == -1 )
143 - {
144 -- xc_dom_panic(XC_INVALID_KERNEL,
145 -- "%s: unable to gzip decompress kernel\n",
146 -- __FUNCTION__);
147 -+ if ( verbose )
148 -+ xc_dom_panic(XC_INVALID_KERNEL, "%s: unable to decompress kernel\$n",
149 -+ __FUNCTION__);
150 - return -EINVAL;
151 - }
152 - }
153 -+ else
154 -+ {
155 -+ xc_dom_panic(XC_INVALID_KERNEL, "%s: unknown compression format\n",
156 -+ __FUNCTION__);
157 -+ return -EINVAL;
158 -+ }
159 - else if ( memcmp(dom->kernel_blob, "\102\132\150", 3) == 0 )
160 - {
161 - ret = xc_try_bzip2_decode(dom, &dom->kernel_blob, &dom->kernel_size);
162
163 diff --git a/app-emulation/files/xen-3.4.2-dump_registers-watchdog-fix.patch b/app-emulation/files/xen-3.4.2-dump_registers-watchdog-fix.patch
164 deleted file mode 100644
165 index 7c8ff5b..0000000
166 --- a/app-emulation/files/xen-3.4.2-dump_registers-watchdog-fix.patch
167 +++ /dev/null
168 @@ -1,19 +0,0 @@
169 -diff -r 784caad93325 xen/common/keyhandler.c
170 ---- a/xen/common/keyhandler.c Tue Nov 10 15:03:52 2009 +0000
171 -+++ b/xen/common/keyhandler.c Tue Jan 05 10:47:49 2010 +0000
172 -@@ -106,6 +106,7 @@
173 - unsigned int cpu;
174 -
175 - /* We want to get everything out that we possibly can. */
176 -+ watchdog_disable();
177 - console_start_sync();
178 -
179 - printk("'%c' pressed -> dumping registers\n", key);
180 -@@ -125,6 +126,7 @@
181 - printk("\n");
182 -
183 - console_end_sync();
184 -+ watchdog_enable();
185 - }
186 -
187 - static void dump_dom0_registers(unsigned char key)
188
189 diff --git a/app-emulation/files/xen-3.4.2-fix-__addr_ok-limit.patch b/app-emulation/files/xen-3.4.2-fix-__addr_ok-limit.patch
190 deleted file mode 100644
191 index 8616008..0000000
192 --- a/app-emulation/files/xen-3.4.2-fix-__addr_ok-limit.patch
193 +++ /dev/null
194 @@ -1,101 +0,0 @@
195 ------BEGIN PGP SIGNED MESSAGE-----
196 -Hash: SHA1
197 -
198 - Xen Security Advisory CVE-2011-2901 / XSA-4
199 - revision no.2
200 - Xen <= 3.3 DoS due to incorrect virtual address validation
201 -
202 -ISSUE DESCRIPTION
203 -=================
204 -
205 -The x86_64 __addr_ok() macro intends to ensure that the checked
206 -address is either in the positive half of the 48-bit virtual address
207 -space, or above the Xen-reserved area. However, the current shift
208 -count is off-by-one, allowing full access to the "negative half" too,
209 -via certain hypercalls which ignore virtual-address bits [63:48].
210 -Vulnerable hypercalls exist only in very old versions of the
211 -hypervisor.
212 -
213 -VULNERABLE SYSTEMS
214 -==================
215 -
216 -All systems running a Xen 3.3 or earlier hypervisor with 64-bit PV
217 -guests with untrusted administrators are vulnerable.
218 -
219 -IMPACT
220 -======
221 -
222 -A malicious guest administrator on a vulnerable system is able to
223 -crash the host.
224 -
225 -There are no known further exploits but these have not been ruled out.
226 -
227 -RESOLUTION
228 -==========
229 -
230 -The attached patch resolves the issue.
231 -
232 -Alternatively, users may choose to upgrade to a more recent hypervisor
233 -
234 -PATCHES
235 -=======
236 -
237 -The following patch resolves this issue.
238 -
239 -Filename: fix-__addr_ok-limit.patch
240 -SHA1: f18bde8d276110451c608a16f577865aa1226b4f
241 -SHA256: 2da5aac72e1ac4849c34d38374ae456795905fd9512eef94b48fc31383c21636
242 -
243 -This patch should apply cleanly, and fix the problem, for all affected
244 -versions of Xen.
245 -
246 -It is harmless when applied to later hypervisors and will be included
247 -in the Xen unstable branch in due course.
248 -
249 -VERSION HISTORY
250 -===============
251 -
252 -Analysis following version 1 of this advisory (sent out to the
253 -predisclosure list during the embargo period) indicates that the
254 -actual DoS vulnerability only exists in very old hypervisors, Xen 3.3
255 -and earlier, contrary to previous reports.
256 -
257 -This advisory is no longer embargoed.
258 ------BEGIN PGP SIGNATURE-----
259 -Version: GnuPG v1.4.9 (GNU/Linux)
260 -
261 -iQEcBAEBAgAGBQJOYLq2AAoJEIP+FMlX6CvZLegH/26/oJBkd/WM/yYhXkzlbnIP
262 -MxF6Fgy96Omu8poQTanD7g1vEcM0TOLY+Kk3GGsfj4aDdEJ5Nq4ZOW8ooI0VnVcD
263 -7VXQqFsXPxre+eZ6g+G0AsmzdsG45C3qujUTRfGKqzYwXqjWjt9nNsdIy1Mrz8/4
264 -zG1uLDkN0LXnBG2Te4q8ZckYwMq8gFXHHnH35RfQ5Besu6pvJmtK3rFXETdlP12A
265 -JjBh7t5jsCfzvYWFQehVp8mJupuftiOBPClmVh4vrvN9gYd5rzEgB4Q9Ioiqz2qT
266 -2bE1zegR8NeOKBOi9xriTU8F530OdFzeWAbo7D5gyEbYdc60eNwbadcgNGLbzMg=
267 -=09T8
268 ------END PGP SIGNATURE-----
269 -
270 -Subject: XSA-4: xen: correct limit checking in x86_64 version of __addr_ok
271 -
272 -The x86_64 __addr_ok() macro intends to ensure that the checked
273 -address is either in the positive half of the 48-bit virtual address
274 -space, or above the Xen-reserved area. However, the current shift
275 -count is off-by-one, allowing full access to the "negative half"
276 -too. Guests may exploit this to gain access to off-limits ranges.
277 -
278 -This issue has been assigned CVE-2011-2901.
279 -
280 -Signed-off-by: Laszlo Ersek <lersek@××××××.com>
281 -Signed-off-by: Ian Campbell <ian.campbell@××××××.com>
282 -
283 -diff --git a/xen/include/asm-x86/x86_64/uaccess.h
284 -b/xen/include/asm-x86/x86_64/uaccess.h
285 ---- a/xen/include/asm-x86/x86_64/uaccess.h
286 -+++ b/xen/include/asm-x86/x86_64/uaccess.h
287 -@@ -34,7 +34,7 @@
288 - * non-canonical address (and thus fault) before ever reaching VIRT_START.
289 - */
290 - #define __addr_ok(addr) \
291 -- (((unsigned long)(addr) < (1UL<<48)) || \
292 -+ (((unsigned long)(addr) < (1UL<<47)) || \
293 - ((unsigned long)(addr) >= HYPERVISOR_VIRT_END))
294 -
295 - #define access_ok(addr, size) \
296
297 diff --git a/app-emulation/files/xen-3.4.2-no-DMA.patch b/app-emulation/files/xen-3.4.2-no-DMA.patch
298 deleted file mode 100644
299 index f04d9e2..0000000
300 --- a/app-emulation/files/xen-3.4.2-no-DMA.patch
301 +++ /dev/null
302 @@ -1,71 +0,0 @@
303 -# HG changeset patch
304 -# User Tim Deegan <Tim.Deegan@××××××.com>
305 -# Date 1313145221 -3600
306 -# Node ID 84e3706df07a1963e23cd3875d8603917657d462
307 -# Parent cb22fa57ff252893b6adb1481e09b1287eacd990
308 -Passthrough: disable bus-mastering on any card that causes an IOMMU fault.
309 -
310 -This stops the card from raising back-to-back faults and live-locking
311 -the CPU that handles them.
312 -
313 -Signed-off-by: Tim Deegan <tim@×××.org>
314 -Acked-by: Wei Wang2 <wei.wang2@×××.com>
315 -Acked-by: Allen M Kay <allen.m.kay@×××××.com>
316 -
317 ---- a/xen/drivers/passthrough/vtd/iommu.c.orig Mon Jul 25 16:48:39 2011 +0100
318 -+++ b/xen/drivers/passthrough/vtd/iommu.c Fri Aug 12 11:33:41 2011 +0100
319 -@@ -733,7 +733,7 @@
320 - while (1)
321 - {
322 - u8 fault_reason;
323 -- u16 source_id;
324 -+ u16 source_id, cword;
325 - u32 data;
326 - u64 guest_addr;
327 - int type;
328 -@@ -766,6 +766,14 @@
329 - iommu_page_fault_do_one(iommu, type, fault_reason,
330 - source_id, guest_addr);
331 -
332 -+ /* Tell the device to stop DMAing; we can't rely on the guest to
333 -+ * control it for us. */
334 -+ cword = pci_conf_read16(PCI_BUS(source_id), PCI_SLOT(source_id),
335 -+ PCI_FUNC(source_id), PCI_COMMAND);
336 -+ pci_conf_write16(PCI_BUS(source_id), PCI_SLOT(source_id),
337 -+ PCI_FUNC(source_id), PCI_COMMAND,
338 -+ cword & ~PCI_COMMAND_MASTER);
339 -+
340 - fault_index++;
341 - if ( fault_index > cap_num_fault_regs(iommu->cap) )
342 - fault_index = 0;
343 -
344 ---- a/xen/drivers/passthrough/amd/iommu_init.c.orig Mon Jul 25 16:48:39 2011 +0100
345 -+++ b/xen/drivers/passthrough/amd/iommu_init.c Fri Aug 12 11:33:41 2011 +0100
346 -@@ -415,7 +415,7 @@
347 -
348 - static void parse_event_log_entry(u32 entry[])
349 - {
350 -- u16 domain_id, device_id;
351 -+ u16 domain_id, device_id, bdf, cword;
352 - u32 code;
353 - u64 *addr;
354 - char * event_str[] = {"ILLEGAL_DEV_TABLE_ENTRY",
355 -@@ -449,6 +449,18 @@
356 - printk(XENLOG_ERR "AMD-Vi: "
357 - "%s: domain = %d, device id = 0x%04x, fault address = 0x%"PRIx64"\n",
358 - event_str[code-1], domain_id, device_id, *addr);
359 -+
360 -+ /* Tell the device to stop DMAing; we can't rely on the guest to
361 -+ * control it for us. */
362 -+ for ( bdf = 0; bdf < ivrs_bdf_entries; bdf++ )
363 -+ if ( get_dma_requestor_id(bdf) == device_id )
364 -+ {
365 -+ cword = pci_conf_read16(PCI_BUS(bdf), PCI_SLOT(bdf),
366 -+ PCI_FUNC(bdf), PCI_COMMAND);
367 -+ pci_conf_write16(PCI_BUS(bdf), PCI_SLOT(bdf),
368 -+ PCI_FUNC(bdf), PCI_COMMAND,
369 -+ cword & ~PCI_COMMAND_MASTER);
370 -+ }
371 - }
372 - }
373 -
374
375 diff --git a/app-emulation/files/xen-3.4.2-werror-idiocy.patch b/app-emulation/files/xen-3.4.2-werror-idiocy.patch
376 deleted file mode 100644
377 index 7f5b3cb..0000000
378 --- a/app-emulation/files/xen-3.4.2-werror-idiocy.patch
379 +++ /dev/null
380 @@ -1,429 +0,0 @@
381 -diff -ur xen-3.4.2.orig//Config.mk xen-3.4.2//Config.mk
382 ---- xen-3.4.2.orig//Config.mk 2009-11-10 23:16:03.000000000 +0800
383 -+++ xen-3.4.2//Config.mk 2011-09-25 02:34:11.605793042 +0800
384 -@@ -14,7 +14,7 @@
385 -
386 - # Tools to run on system hosting the build
387 - HOSTCC = gcc
388 --HOSTCFLAGS = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
389 -+HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
390 - HOSTCFLAGS += -fno-strict-aliasing
391 -
392 - DISTDIR ?= $(XEN_ROOT)/dist
393 -diff -ur xen-3.4.2.orig//extras/mini-os/minios.mk xen-3.4.2//extras/mini-os/minios.mk
394 ---- xen-3.4.2.orig//extras/mini-os/minios.mk 2009-11-10 23:12:55.000000000 +0800
395 -+++ xen-3.4.2//extras/mini-os/minios.mk 2011-09-25 02:34:11.855793042 +0800
396 -@@ -6,7 +6,7 @@
397 -
398 - # Define some default flags.
399 - # NB. '-Wcast-qual' is nasty, so I omitted it.
400 --DEF_CFLAGS += -fno-builtin -Wall -Werror -Wredundant-decls -Wno-format -Wno-redundant-decls
401 -+DEF_CFLAGS += -fno-builtin -Wall -Wredundant-decls -Wno-format -Wno-redundant-decls
402 - DEF_CFLAGS += $(call cc-option,$(CC),-fno-stack-protector,)
403 - DEF_CFLAGS += $(call cc-option,$(CC),-fgnu89-inline)
404 - DEF_CFLAGS += -Wstrict-prototypes -Wnested-externs -Wpointer-arith -Winline
405 -diff -ur xen-3.4.2.orig//tools/blktap/drivers/Makefile xen-3.4.2//tools/blktap/drivers/Makefile
406 ---- xen-3.4.2.orig//tools/blktap/drivers/Makefile 2009-11-10 23:12:55.000000000 +0800
407 -+++ xen-3.4.2//tools/blktap/drivers/Makefile 2011-09-25 02:34:11.750793042 +0800
408 -@@ -5,7 +5,7 @@
409 - QCOW_UTIL = img2qcow qcow2raw qcow-create
410 - LIBAIO_DIR = ../../libaio/src
411 -
412 --CFLAGS += -Werror
413 -+CFLAGS +=
414 - CFLAGS += -Wno-unused
415 - CFLAGS += -I../lib
416 - CFLAGS += $(CFLAGS_libxenctrl)
417 -diff -ur xen-3.4.2.orig//tools/blktap/lib/Makefile xen-3.4.2//tools/blktap/lib/Makefile
418 ---- xen-3.4.2.orig//tools/blktap/lib/Makefile 2009-11-10 23:12:55.000000000 +0800
419 -+++ xen-3.4.2//tools/blktap/lib/Makefile 2011-09-25 02:34:11.748793042 +0800
420 -@@ -13,7 +13,7 @@
421 - SRCS :=
422 - SRCS += xenbus.c blkif.c xs_api.c
423 -
424 --CFLAGS += -Werror
425 -+CFLAGS +=
426 - CFLAGS += -Wno-unused
427 - CFLAGS += -fPIC
428 - # get asprintf():
429 -diff -ur xen-3.4.2.orig//tools/console/Makefile xen-3.4.2//tools/console/Makefile
430 ---- xen-3.4.2.orig//tools/console/Makefile 2009-11-10 23:12:55.000000000 +0800
431 -+++ xen-3.4.2//tools/console/Makefile 2011-09-25 02:34:11.704793042 +0800
432 -@@ -2,7 +2,7 @@
433 - XEN_ROOT=../..
434 - include $(XEN_ROOT)/tools/Rules.mk
435 -
436 --CFLAGS += -Werror
437 -+CFLAGS +=
438 -
439 - CFLAGS += $(CFLAGS_libxenctrl)
440 - CFLAGS += $(CFLAGS_libxenstore)
441 -diff -ur xen-3.4.2.orig//tools/debugger/xenitp/Makefile xen-3.4.2//tools/debugger/xenitp/Makefile
442 ---- xen-3.4.2.orig//tools/debugger/xenitp/Makefile 2009-11-10 23:12:55.000000000 +0800
443 -+++ xen-3.4.2//tools/debugger/xenitp/Makefile 2011-09-25 02:34:11.744793042 +0800
444 -@@ -1,7 +1,7 @@
445 - XEN_ROOT=../../..
446 - include $(XEN_ROOT)/tools/Rules.mk
447 -
448 --#CFLAGS += -Werror -g -O0
449 -+#CFLAGS += -g -O0
450 -
451 - CFLAGS += $(CFLAGS_libxenctrl)
452 -
453 -diff -ur xen-3.4.2.orig//tools/firmware/Rules.mk xen-3.4.2//tools/firmware/Rules.mk
454 ---- xen-3.4.2.orig//tools/firmware/Rules.mk 2009-11-10 23:12:55.000000000 +0800
455 -+++ xen-3.4.2//tools/firmware/Rules.mk 2011-09-25 02:34:11.565793045 +0800
456 -@@ -10,7 +10,7 @@
457 - CFLAGS += -DNDEBUG
458 - endif
459 -
460 --CFLAGS += -Werror
461 -+CFLAGS +=
462 -
463 - # Disable PIE/SSP if GCC supports them. They can break us.
464 - $(call cc-option-add,CFLAGS,CC,-nopie)
465 -diff -ur xen-3.4.2.orig//tools/flask/libflask/Makefile xen-3.4.2//tools/flask/libflask/Makefile
466 ---- xen-3.4.2.orig//tools/flask/libflask/Makefile 2009-11-10 23:12:56.000000000 +0800
467 -+++ xen-3.4.2//tools/flask/libflask/Makefile 2011-09-25 02:34:11.657793042 +0800
468 -@@ -9,7 +9,7 @@
469 - SRCS :=
470 - SRCS += flask_op.c
471 -
472 --CFLAGS += -Werror
473 -+CFLAGS +=
474 - CFLAGS += -fno-strict-aliasing
475 - CFLAGS += $(INCLUDES) -I./include -I$(XEN_LIBXC) -I$(XEN_INCLUDE)
476 -
477 -diff -ur xen-3.4.2.orig//tools/flask/loadpolicy/Makefile xen-3.4.2//tools/flask/loadpolicy/Makefile
478 ---- xen-3.4.2.orig//tools/flask/loadpolicy/Makefile 2009-11-10 23:12:56.000000000 +0800
479 -+++ xen-3.4.2//tools/flask/loadpolicy/Makefile 2011-09-25 02:34:11.660793042 +0800
480 -@@ -6,7 +6,7 @@
481 - LIBFLASK_ROOT = $(XEN_ROOT)/tools/flask/libflask
482 -
483 - PROFILE=#-pg
484 --BASECFLAGS=-Wall -g -Werror
485 -+BASECFLAGS=-Wall -g
486 - BASECFLAGS+= $(PROFILE)
487 - #BASECFLAGS+= -I$(XEN_ROOT)/tools
488 - BASECFLAGS+= $(CFLAGS_libxenctrl)
489 -diff -ur xen-3.4.2.orig//tools/fs-back/Makefile xen-3.4.2//tools/fs-back/Makefile
490 ---- xen-3.4.2.orig//tools/fs-back/Makefile 2009-11-10 23:12:56.000000000 +0800
491 -+++ xen-3.4.2//tools/fs-back/Makefile 2011-09-25 02:34:11.637793042 +0800
492 -@@ -5,7 +5,7 @@
493 -
494 - IBIN = fs-backend
495 -
496 --CFLAGS += -Werror
497 -+CFLAGS +=
498 - CFLAGS += -Wno-unused
499 - CFLAGS += -fno-strict-aliasing
500 - CFLAGS += $(CFLAGS_libxenctrl)
501 -diff -ur xen-3.4.2.orig//tools/ioemu-qemu-xen/configure xen-3.4.2//tools/ioemu-qemu-xen/configure
502 ---- xen-3.4.2.orig//tools/ioemu-qemu-xen/configure 2009-11-05 19:44:56.000000000 +0800
503 -+++ xen-3.4.2//tools/ioemu-qemu-xen/configure 2011-09-25 02:34:11.888793042 +0800
504 -@@ -468,7 +468,7 @@
505 - CFLAGS="$CFLAGS -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls"
506 - LDFLAGS="$LDFLAGS -g"
507 - if test "$werror" = "yes" ; then
508 --CFLAGS="$CFLAGS -Werror"
509 -+CFLAGS="$CFLAGS"
510 - fi
511 -
512 - if test "$solaris" = "no" ; then
513 -@@ -1150,7 +1150,7 @@
514 - echo "sparse enabled $sparse"
515 - echo "profiler $profiler"
516 - echo "static build $static"
517 --echo "-Werror enabled $werror"
518 -+
519 - if test "$darwin" = "yes" ; then
520 - echo "Cocoa support $cocoa"
521 - fi
522 -diff -ur xen-3.4.2.orig//tools/ioemu-qemu-xen/Makefile.target xen-3.4.2//tools/ioemu-qemu-xen/Makefile.target
523 ---- xen-3.4.2.orig//tools/ioemu-qemu-xen/Makefile.target 2011-09-25 02:33:23.946793064 +0800
524 -+++ xen-3.4.2//tools/ioemu-qemu-xen/Makefile.target 2011-09-25 02:34:11.584793042 +0800
525 -@@ -26,7 +26,7 @@
526 - TARGET_PATH=$(SRC_PATH)/target-$(TARGET_BASE_ARCH)
527 - VPATH=$(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw
528 - CPPFLAGS=-I. -I.. -I$(TARGET_PATH) -I$(SRC_PATH) -MMD -MT $@ -MP -DNEED_CPU_H
529 --#CFLAGS+=-Werror
530 -+#CFLAGS+=
531 - LIBS=
532 - # user emulator name
533 - ifndef TARGET_ARCH2
534 -diff -ur xen-3.4.2.orig//tools/libaio/harness/Makefile xen-3.4.2//tools/libaio/harness/Makefile
535 ---- xen-3.4.2.orig//tools/libaio/harness/Makefile 2009-11-10 23:12:56.000000000 +0800
536 -+++ xen-3.4.2//tools/libaio/harness/Makefile 2011-09-25 02:34:11.674793042 +0800
537 -@@ -4,7 +4,7 @@
538 - HARNESS_SRCS:=main.c
539 - # io_queue.c
540 -
541 --CFLAGS=-Wall -Werror -g -O -laio
542 -+CFLAGS=-Wall -g -O -laio
543 - #-lpthread -lrt
544 -
545 - all: $(PROGS)
546 -diff -ur xen-3.4.2.orig//tools/libfsimage/Rules.mk xen-3.4.2//tools/libfsimage/Rules.mk
547 ---- xen-3.4.2.orig//tools/libfsimage/Rules.mk 2009-11-10 23:12:56.000000000 +0800
548 -+++ xen-3.4.2//tools/libfsimage/Rules.mk 2011-09-25 02:34:11.566793044 +0800
549 -@@ -1,6 +1,6 @@
550 - include $(XEN_ROOT)/tools/Rules.mk
551 -
552 --CFLAGS += -I$(XEN_ROOT)/tools/libfsimage/common/ -Werror
553 -+CFLAGS += -I$(XEN_ROOT)/tools/libfsimage/common/
554 - LDFLAGS += -L../common/
555 -
556 - PIC_OBJS := $(patsubst %.c,%.opic,$(LIB_SRCS-y))
557 -diff -ur xen-3.4.2.orig//tools/libxc/Makefile xen-3.4.2//tools/libxc/Makefile
558 ---- xen-3.4.2.orig//tools/libxc/Makefile 2011-09-25 02:33:23.987793064 +0800
559 -+++ xen-3.4.2//tools/libxc/Makefile 2011-09-25 02:34:11.687793042 +0800
560 -@@ -52,7 +52,7 @@
561 -
562 - -include $(XEN_TARGET_ARCH)/Makefile
563 -
564 --CFLAGS += -Werror -Wmissing-prototypes
565 -+CFLAGS += -Wmissing-prototypes
566 - CFLAGS += $(INCLUDES) -I. -I../xenstore -I../include
567 -
568 - # Needed for posix_fadvise64() in xc_linux.c
569 -diff -ur xen-3.4.2.orig//tools/libxen/Makefile.dist xen-3.4.2//tools/libxen/Makefile.dist
570 ---- xen-3.4.2.orig//tools/libxen/Makefile.dist 2009-11-10 23:12:56.000000000 +0800
571 -+++ xen-3.4.2//tools/libxen/Makefile.dist 2011-09-25 02:34:11.593793042 +0800
572 -@@ -22,7 +22,7 @@
573 - CFLAGS = -Iinclude \
574 - $(shell xml2-config --cflags) \
575 - $(shell curl-config --cflags) \
576 -- -W -Wall -Wmissing-prototypes -Werror -std=c99 -O2 -fPIC
577 -+ -W -Wall -Wmissing-prototypes -std=c99 -O2 -fPIC
578 -
579 - LDFLAGS = $(shell xml2-config --libs) \
580 - $(shell curl-config --libs)
581 -diff -ur xen-3.4.2.orig//tools/misc/lomount/Makefile xen-3.4.2//tools/misc/lomount/Makefile
582 ---- xen-3.4.2.orig//tools/misc/lomount/Makefile 2009-11-10 23:12:56.000000000 +0800
583 -+++ xen-3.4.2//tools/misc/lomount/Makefile 2011-09-25 02:34:11.666793042 +0800
584 -@@ -1,7 +1,7 @@
585 - XEN_ROOT=../../..
586 - include $(XEN_ROOT)/tools/Rules.mk
587 -
588 --CFLAGS += -Werror
589 -+CFLAGS +=
590 -
591 - HDRS = $(wildcard *.h)
592 - OBJS = $(patsubst %.c,%.o,$(wildcard *.c))
593 -diff -ur xen-3.4.2.orig//tools/misc/Makefile xen-3.4.2//tools/misc/Makefile
594 ---- xen-3.4.2.orig//tools/misc/Makefile 2009-11-10 23:12:56.000000000 +0800
595 -+++ xen-3.4.2//tools/misc/Makefile 2011-09-25 02:34:11.669793042 +0800
596 -@@ -1,7 +1,7 @@
597 - XEN_ROOT=../..
598 - include $(XEN_ROOT)/tools/Rules.mk
599 -
600 --CFLAGS += -Werror
601 -+CFLAGS +=
602 -
603 - INCLUDES += -I $(XEN_XC)
604 - INCLUDES += -I $(XEN_LIBXC)
605 -diff -ur xen-3.4.2.orig//tools/pygrub/setup.py xen-3.4.2//tools/pygrub/setup.py
606 ---- xen-3.4.2.orig//tools/pygrub/setup.py 2009-11-10 23:12:56.000000000 +0800
607 -+++ xen-3.4.2//tools/pygrub/setup.py 2011-09-25 02:34:11.901793042 +0800
608 -@@ -3,7 +3,7 @@
609 - import os
610 - import sys
611 -
612 --extra_compile_args = [ "-fno-strict-aliasing", "-Werror" ]
613 -+extra_compile_args = [ "-fno-strict-aliasing" ]
614 -
615 - XEN_ROOT = "../.."
616 -
617 -diff -ur xen-3.4.2.orig//tools/python/setup.py xen-3.4.2//tools/python/setup.py
618 ---- xen-3.4.2.orig//tools/python/setup.py 2009-11-10 23:12:56.000000000 +0800
619 -+++ xen-3.4.2//tools/python/setup.py 2011-09-25 02:34:11.897793042 +0800
620 -@@ -4,7 +4,7 @@
621 -
622 - XEN_ROOT = "../.."
623 -
624 --extra_compile_args = [ "-fno-strict-aliasing", "-Werror" ]
625 -+extra_compile_args = [ "-fno-strict-aliasing" ]
626 -
627 - include_dirs = [ XEN_ROOT + "/tools/libxc",
628 - XEN_ROOT + "/tools/xenstore",
629 -diff -ur xen-3.4.2.orig//tools/security/Makefile xen-3.4.2//tools/security/Makefile
630 ---- xen-3.4.2.orig//tools/security/Makefile 2009-11-10 23:12:56.000000000 +0800
631 -+++ xen-3.4.2//tools/security/Makefile 2011-09-25 02:34:11.701793042 +0800
632 -@@ -1,7 +1,7 @@
633 - XEN_ROOT = ../..
634 - include $(XEN_ROOT)/tools/Rules.mk
635 -
636 --CFLAGS += -Werror
637 -+CFLAGS +=
638 - CFLAGS += -fno-strict-aliasing
639 - CFLAGS += -I. $(CFLAGS_libxenctrl)
640 -
641 -diff -ur xen-3.4.2.orig//tools/vnet/libxutil/Makefile xen-3.4.2//tools/vnet/libxutil/Makefile
642 ---- xen-3.4.2.orig//tools/vnet/libxutil/Makefile 2009-11-10 23:12:57.000000000 +0800
643 -+++ xen-3.4.2//tools/vnet/libxutil/Makefile 2011-09-25 02:34:11.694793042 +0800
644 -@@ -25,7 +25,7 @@
645 - PIC_OBJS := $(LIB_SRCS:.c=.opic)
646 -
647 - $(call cc-option-add,CFLAGS,CC,-fgnu89-inline)
648 --CFLAGS += -Werror -fno-strict-aliasing
649 -+CFLAGS += -fno-strict-aliasing
650 - CFLAGS += -O3
651 - #CFLAGS += -g
652 -
653 -diff -ur xen-3.4.2.orig//tools/vtpm/Rules.mk xen-3.4.2//tools/vtpm/Rules.mk
654 ---- xen-3.4.2.orig//tools/vtpm/Rules.mk 2009-11-10 23:12:57.000000000 +0800
655 -+++ xen-3.4.2//tools/vtpm/Rules.mk 2011-09-25 02:34:11.563793044 +0800
656 -@@ -9,7 +9,7 @@
657 - TOOLS_INSTALL_DIR = $(DESTDIR)/usr/bin
658 -
659 - # General compiler flags
660 --CFLAGS = -Werror -g3 -I.
661 -+CFLAGS = -g3 -I.
662 -
663 - # Generic project files
664 - HDRS = $(wildcard *.h)
665 -diff -ur xen-3.4.2.orig//tools/vtpm_manager/Rules.mk xen-3.4.2//tools/vtpm_manager/Rules.mk
666 ---- xen-3.4.2.orig//tools/vtpm_manager/Rules.mk 2009-11-10 23:12:57.000000000 +0800
667 -+++ xen-3.4.2//tools/vtpm_manager/Rules.mk 2011-09-25 02:34:11.562793042 +0800
668 -@@ -9,7 +9,7 @@
669 - TOOLS_INSTALL_DIR = $(DESTDIR)/usr/bin
670 -
671 - # General compiler flags
672 --CFLAGS = -Werror -g3 -I.
673 -+CFLAGS = -g3 -I.
674 -
675 - # Generic project files
676 - HDRS = $(wildcard *.h)
677 -diff -ur xen-3.4.2.orig//tools/xcutils/Makefile xen-3.4.2//tools/xcutils/Makefile
678 ---- xen-3.4.2.orig//tools/xcutils/Makefile 2009-11-10 23:12:57.000000000 +0800
679 -+++ xen-3.4.2//tools/xcutils/Makefile 2011-09-25 02:34:11.636793042 +0800
680 -@@ -11,7 +11,7 @@
681 - XEN_ROOT = ../..
682 - include $(XEN_ROOT)/tools/Rules.mk
683 -
684 --CFLAGS += -Werror
685 -+CFLAGS +=
686 - CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_libxenguest) $(CFLAGS_libxenstore)
687 -
688 - PROGRAMS = xc_restore xc_save readnotes lsevtchn
689 -diff -ur xen-3.4.2.orig//tools/xenmon/Makefile xen-3.4.2//tools/xenmon/Makefile
690 ---- xen-3.4.2.orig//tools/xenmon/Makefile 2009-11-10 23:12:57.000000000 +0800
691 -+++ xen-3.4.2//tools/xenmon/Makefile 2011-09-25 02:34:11.641793042 +0800
692 -@@ -13,7 +13,7 @@
693 - XEN_ROOT=../..
694 - include $(XEN_ROOT)/tools/Rules.mk
695 -
696 --CFLAGS += -Werror
697 -+CFLAGS +=
698 - CFLAGS += -I $(XEN_XC)
699 - CFLAGS += $(CFLAGS_libxenctrl)
700 - LDFLAGS += $(LDFLAGS_libxenctrl)
701 -diff -ur xen-3.4.2.orig//tools/xenpmd/Makefile xen-3.4.2//tools/xenpmd/Makefile
702 ---- xen-3.4.2.orig//tools/xenpmd/Makefile 2009-11-10 23:12:57.000000000 +0800
703 -+++ xen-3.4.2//tools/xenpmd/Makefile 2011-09-25 02:34:11.656793042 +0800
704 -@@ -1,7 +1,7 @@
705 - XEN_ROOT=../..
706 - include $(XEN_ROOT)/tools/Rules.mk
707 -
708 --CFLAGS += -Werror
709 -+CFLAGS +=
710 - CFLAGS += $(CFLAGS_libxenstore)
711 - LDFLAGS += $(LDFLAGS_libxenstore)
712 -
713 -diff -ur xen-3.4.2.orig//tools/xenstat/libxenstat/Makefile xen-3.4.2//tools/xenstat/libxenstat/Makefile
714 ---- xen-3.4.2.orig//tools/xenstat/libxenstat/Makefile 2009-11-10 23:12:57.000000000 +0800
715 -+++ xen-3.4.2//tools/xenstat/libxenstat/Makefile 2011-09-25 02:34:11.681793042 +0800
716 -@@ -34,7 +34,7 @@
717 - OBJECTS-$(CONFIG_NetBSD) += src/xenstat_netbsd.o
718 - SONAME_FLAGS=-Wl,$(SONAME_LDFLAG) -Wl,libxenstat.so.$(MAJOR)
719 -
720 --WARN_FLAGS=-Wall -Werror
721 -+WARN_FLAGS=-Wall
722 -
723 - CFLAGS+=-Isrc -I$(XEN_LIBXC) -I$(XEN_XENSTORE) -I$(XEN_INCLUDE)
724 - LDFLAGS+=-Lsrc -L$(XEN_XENSTORE)/ -L$(XEN_LIBXC)/
725 -diff -ur xen-3.4.2.orig//tools/xenstat/xentop/Makefile xen-3.4.2//tools/xenstat/xentop/Makefile
726 ---- xen-3.4.2.orig//tools/xenstat/xentop/Makefile 2009-11-10 23:12:57.000000000 +0800
727 -+++ xen-3.4.2//tools/xenstat/xentop/Makefile 2011-09-25 02:34:11.684793042 +0800
728 -@@ -18,7 +18,7 @@
729 - all install xentop:
730 - else
731 -
732 --CFLAGS += -DGCC_PRINTF -Wall -Werror -I$(XEN_LIBXENSTAT)
733 -+CFLAGS += -DGCC_PRINTF -Wall -I$(XEN_LIBXENSTAT)
734 - LDFLAGS += -L$(XEN_LIBXENSTAT)
735 - LDLIBS += -lxenstat $(CURSES_LIBS) $(SOCKET_LIBS)
736 - CFLAGS += -DHOST_$(XEN_OS)
737 -diff -ur xen-3.4.2.orig//tools/xenstore/Makefile xen-3.4.2//tools/xenstore/Makefile
738 ---- xen-3.4.2.orig//tools/xenstore/Makefile 2009-11-10 23:12:57.000000000 +0800
739 -+++ xen-3.4.2//tools/xenstore/Makefile 2011-09-25 02:34:11.640793042 +0800
740 -@@ -4,7 +4,7 @@
741 - MAJOR = 3.0
742 - MINOR = 0
743 -
744 --CFLAGS += -Werror
745 -+CFLAGS +=
746 - CFLAGS += -I.
747 - CFLAGS += $(CFLAGS_libxenctrl)
748 -
749 -diff -ur xen-3.4.2.orig//tools/xenstore/xenstored_core.c xen-3.4.2//tools/xenstore/xenstored_core.c
750 ---- xen-3.4.2.orig//tools/xenstore/xenstored_core.c 2009-11-10 23:12:57.000000000 +0800
751 -+++ xen-3.4.2//tools/xenstore/xenstored_core.c 2011-09-25 02:34:11.845793042 +0800
752 -@@ -865,7 +865,7 @@
753 - {
754 - unsigned int offset, datalen;
755 - struct node *node;
756 -- char *vec[1] = { NULL }; /* gcc4 + -W + -Werror fucks code. */
757 -+ char *vec[1] = { NULL }; /* gcc4 + -W + fucks code. */
758 - char *name;
759 -
760 - /* Extra "strings" can be created by binary data. */
761 -diff -ur xen-3.4.2.orig//tools/xentrace/Makefile xen-3.4.2//tools/xentrace/Makefile
762 ---- xen-3.4.2.orig//tools/xentrace/Makefile 2009-11-10 23:12:57.000000000 +0800
763 -+++ xen-3.4.2//tools/xentrace/Makefile 2011-09-25 02:34:11.745793042 +0800
764 -@@ -1,7 +1,7 @@
765 - XEN_ROOT=../..
766 - include $(XEN_ROOT)/tools/Rules.mk
767 -
768 --CFLAGS += -Werror
769 -+CFLAGS +=
770 -
771 - CFLAGS += $(CFLAGS_libxenctrl)
772 - LDFLAGS += $(LDFLAGS_libxenctrl)
773 -Only in xen-3.4.2/: Werror.sh
774 -diff -ur xen-3.4.2.orig//xen/arch/ia64/Rules.mk xen-3.4.2//xen/arch/ia64/Rules.mk
775 ---- xen-3.4.2.orig//xen/arch/ia64/Rules.mk 2009-11-10 23:12:57.000000000 +0800
776 -+++ xen-3.4.2//xen/arch/ia64/Rules.mk 2011-09-25 02:34:11.570793042 +0800
777 -@@ -68,7 +68,7 @@
778 - CFLAGS += -DCONFIG_XEN_IA64_TLBFLUSH_CLOCK
779 - endif
780 - ifeq ($(no_warns),y)
781 --CFLAGS += -Wa,--fatal-warnings -Werror -Wno-uninitialized
782 -+CFLAGS += -Wa,--fatal-warnings -Wno-uninitialized
783 - endif
784 - ifneq ($(vhpt_disable),y)
785 - CFLAGS += -DVHPT_ENABLED=1
786 -diff -ur xen-3.4.2.orig//xen/arch/x86/boot/build32.mk xen-3.4.2//xen/arch/x86/boot/build32.mk
787 ---- xen-3.4.2.orig//xen/arch/x86/boot/build32.mk 2009-11-10 23:12:57.000000000 +0800
788 -+++ xen-3.4.2//xen/arch/x86/boot/build32.mk 2011-09-25 02:34:11.914793042 +0800
789 -@@ -8,7 +8,7 @@
790 - $(call cc-option-add,CFLAGS,CC,-fno-stack-protector)
791 - $(call cc-option-add,CFLAGS,CC,-fno-stack-protector-all)
792 -
793 --CFLAGS += -Werror -fno-builtin -msoft-float
794 -+CFLAGS += -fno-builtin -msoft-float
795 -
796 - # NB. awk invocation is a portable alternative to 'head -n -1'
797 - %.S: %.bin
798 -diff -ur xen-3.4.2.orig//xen/arch/x86/Rules.mk xen-3.4.2//xen/arch/x86/Rules.mk
799 ---- xen-3.4.2.orig//xen/arch/x86/Rules.mk 2009-11-10 23:12:57.000000000 +0800
800 -+++ xen-3.4.2//xen/arch/x86/Rules.mk 2011-09-25 02:34:11.572793042 +0800
801 -@@ -17,7 +17,7 @@
802 - endif
803 -
804 - CFLAGS += -fno-builtin -fno-common
805 --CFLAGS += -iwithprefix include -Werror -Wno-pointer-arith -pipe
806 -+CFLAGS += -iwithprefix include -Wno-pointer-arith -pipe
807 - CFLAGS += -I$(BASEDIR)/include
808 - CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-generic
809 - CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-default
810 \ No newline at end of file
811
812 diff --git a/app-emulation/files/xen-4.1.1-iommu_sec_fix.patch b/app-emulation/files/xen-4.1.1-iommu_sec_fix.patch
813 deleted file mode 100644
814 index 737c2bd..0000000
815 --- a/app-emulation/files/xen-4.1.1-iommu_sec_fix.patch
816 +++ /dev/null
817 @@ -1,74 +0,0 @@
818 -
819 -# HG changeset patch
820 -# User Tim Deegan <Tim.Deegan@××××××.com>
821 -# Date 1313145221 -3600
822 -# Node ID 84e3706df07a1963e23cd3875d8603917657d462
823 -# Parent cb22fa57ff252893b6adb1481e09b1287eacd990
824 -Passthrough: disable bus-mastering on any card that causes an IOMMU fault.
825 -
826 -This stops the card from raising back-to-back faults and live-locking
827 -the CPU that handles them.
828 -
829 -Signed-off-by: Tim Deegan <tim@×××.org>
830 -Acked-by: Wei Wang2 <wei.wang2@×××.com>
831 -Acked-by: Allen M Kay <allen.m.kay@×××××.com>
832 -
833 -diff -r cb22fa57ff25 -r 84e3706df07a xen/drivers/passthrough/amd/iommu_init.c
834 ---- a/xen/drivers/passthrough/amd/iommu_init.c Mon Jul 25 16:48:39 2011 +0100
835 -+++ b/xen/drivers/passthrough/amd/iommu_init.c Fri Aug 12 11:33:41 2011 +0100
836 -@@ -462,7 +462,7 @@
837 -
838 - static void parse_event_log_entry(u32 entry[])
839 - {
840 -- u16 domain_id, device_id;
841 -+ u16 domain_id, device_id, bdf, cword;
842 - u32 code;
843 - u64 *addr;
844 - char * event_str[] = {"ILLEGAL_DEV_TABLE_ENTRY",
845 -@@ -497,6 +497,18 @@
846 - "%s: domain = %d, device id = 0x%04x, "
847 - "fault address = 0x%"PRIx64"\n",
848 - event_str[code-1], domain_id, device_id, *addr);
849 -+
850 -+ /* Tell the device to stop DMAing; we can't rely on the guest to
851 -+ * control it for us. */
852 -+ for ( bdf = 0; bdf < ivrs_bdf_entries; bdf++ )
853 -+ if ( get_dma_requestor_id(bdf) == device_id )
854 -+ {
855 -+ cword = pci_conf_read16(PCI_BUS(bdf), PCI_SLOT(bdf),
856 -+ PCI_FUNC(bdf), PCI_COMMAND);
857 -+ pci_conf_write16(PCI_BUS(bdf), PCI_SLOT(bdf),
858 -+ PCI_FUNC(bdf), PCI_COMMAND,
859 -+ cword & ~PCI_COMMAND_MASTER);
860 -+ }
861 - }
862 - else
863 - {
864 -diff -r cb22fa57ff25 -r 84e3706df07a xen/drivers/passthrough/vtd/iommu.c
865 ---- a/xen/drivers/passthrough/vtd/iommu.c Mon Jul 25 16:48:39 2011 +0100
866 -+++ b/xen/drivers/passthrough/vtd/iommu.c Fri Aug 12 11:33:41 2011 +0100
867 -@@ -893,7 +893,7 @@
868 - while (1)
869 - {
870 - u8 fault_reason;
871 -- u16 source_id;
872 -+ u16 source_id, cword;
873 - u32 data;
874 - u64 guest_addr;
875 - int type;
876 -@@ -926,6 +926,14 @@
877 - iommu_page_fault_do_one(iommu, type, fault_reason,
878 - source_id, guest_addr);
879 -
880 -+ /* Tell the device to stop DMAing; we can't rely on the guest to
881 -+ * control it for us. */
882 -+ cword = pci_conf_read16(PCI_BUS(source_id), PCI_SLOT(source_id),
883 -+ PCI_FUNC(source_id), PCI_COMMAND);
884 -+ pci_conf_write16(PCI_BUS(source_id), PCI_SLOT(source_id),
885 -+ PCI_FUNC(source_id), PCI_COMMAND,
886 -+ cword & ~PCI_COMMAND_MASTER);
887 -+
888 - fault_index++;
889 - if ( fault_index > cap_num_fault_regs(iommu->cap) )
890 - fault_index = 0;
891 -
892
893 diff --git a/app-emulation/metadata.xml b/app-emulation/metadata.xml
894 deleted file mode 100644
895 index 6550459..0000000
896 --- a/app-emulation/metadata.xml
897 +++ /dev/null
898 @@ -1,15 +0,0 @@
899 -<?xml version="1.0" encoding="UTF-8"?>
900 -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
901 -<pkgmetadata>
902 - <herd>xen</herd>
903 - <maintainer>
904 - <email>johneed@×××××××.com</email>
905 - <name>Ian Delaney aka idella4 proxy maintainer</name>
906 - </maintainer>
907 - <use>
908 - <flag name='acm'>Enable the ACM/sHype XSM module from IBM</flag>
909 - <flag name='flask'>Enable the Flask XSM module from NSA</flag>
910 - <flag name='pae'>Enable support for PAE kernels (usually x86-32 with >4GB memory)</flag>
911 - <flag name='xsm'>Enable the Xen Security Modules (XSM)</flag>
912 - </use>
913 -</pkgmetadata>
914
915 diff --git a/app-emulation/xen-3.4.2-r4.ebuild b/app-emulation/xen-3.4.2-r4.ebuild
916 deleted file mode 100644
917 index 643ade2..0000000
918 --- a/app-emulation/xen-3.4.2-r4.ebuild
919 +++ /dev/null
920 @@ -1,114 +0,0 @@
921 -# Copyright 1999-2011 Gentoo Foundation
922 -# Distributed under the terms of the GNU General Public License v2
923 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen/xen-3.4.2-r4.ebuild,v 1.3 2011/10/15 19:38:16 hwoarang Exp $
924 -
925 -EAPI=2
926 -
927 -inherit mount-boot flag-o-matic toolchain-funcs base
928 -
929 -DESCRIPTION="The Xen virtual machine monitor"
930 -HOMEPAGE="http://xen.org/"
931 -SRC_URI="http://bits.xensource.com/oss-xen/release/${PV}/xen-${PV}.tar.gz"
932 -
933 -LICENSE="GPL-2"
934 -SLOT="0"
935 -KEYWORDS="amd64 x86"
936 -IUSE="debug custom-cflags pae acm flask xsm"
937 -
938 -RDEPEND="|| ( sys-boot/grub
939 - sys-boot/grub-static )
940 - >=sys-kernel/xen-sources-2.6.18"
941 -PDEPEND="~app-emulation/xen-tools-${PV}"
942 -PATCHES=(
943 - "${FILESDIR}/"${PN}-3.3.0-unexported-target-fix.patch
944 - "${FILESDIR}/"${P}-dump_registers-watchdog-fix.patch
945 - "${FILESDIR}/"${P}-no-DMA.patch
946 - "${FILESDIR}/"${P}-werror-idiocy.patch
947 - "${FILESDIR}/"${P}-fix-__addr_ok-limit.patch
948 - "${FILESDIR}/"${P}-CVE-2011-1583.patch
949 -)
950 -
951 -RESTRICT="test"
952 -
953 -# Approved by QA team in bug #144032
954 -QA_WX_LOAD="boot/xen-syms-${PV}"
955 -
956 -pkg_setup() {
957 - if [ -x "${S}/.config/" ]; then
958 - die "You will need to remove ${S}/.config by hand"
959 - fi
960 - if [[ -z ${XEN_TARGET_ARCH} ]]; then
961 - if use x86 && use amd64; then
962 - die "Confusion! Both x86 and amd64 are set in your use flags!"
963 - elif use x86; then
964 - export XEN_TARGET_ARCH="x86_32"
965 - elif use amd64; then
966 - export XEN_TARGET_ARCH="x86_64"
967 - else
968 - die "Unsupported architecture!"
969 - fi
970 - fi
971 -
972 - if use xsm ; then
973 - export "XSM_ENABLE=y"
974 - use acm && export "ACM_SECURITY=y"
975 - if use flask ; then
976 - ! use acm && export "FLASK_ENABLE=y"
977 - use acm && ewarn "Both acm and flask XSM specified, defaulting to acm."
978 - fi
979 - elif use acm || use flask ; then
980 - ewarn "acm and flask require USE=xsm to be set, dropping use flags"
981 - fi
982 -}
983 -
984 -src_prepare() {
985 - base_src_prepare
986 -
987 - # if the user *really* wants to use their own custom-cflags, let them
988 - if use custom-cflags; then
989 - einfo "User wants their own CFLAGS - removing defaults"
990 - # try and remove all the default custom-cflags
991 - find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk -exec sed \
992 - -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
993 - -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
994 - -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
995 - -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
996 - -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
997 - -i {} \;
998 - fi
999 -}
1000 -
1001 -src_compile() {
1002 - local myopt
1003 - use debug && myopt="${myopt} debug=y"
1004 - use pae && myopt="${myopt} pae=y"
1005 -
1006 - if use custom-cflags; then
1007 - filter-flags -fPIE -fstack-protector
1008 - replace-flags -O3 -O2
1009 - else
1010 - unset CFLAGS
1011 - fi
1012 -
1013 - # Send raw LDFLAGS so that --as-needed works
1014 - emake CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" -C xen ${myopt} || die "compile failed"
1015 -}
1016 -
1017 -src_install() {
1018 - local myopt
1019 - use debug && myopt="${myopt} debug=y"
1020 - use pae && myopt="${myopt} pae=y"
1021 -
1022 - emake LDFLAGS="$(raw-ldflags)" DESTDIR="${D}" -C xen ${myopt} install || die "install failed"
1023 -}
1024 -
1025 -pkg_postinst() {
1026 - elog "Official Xen Guide and the unoffical wiki page:"
1027 - elog " http://www.gentoo.org/doc/en/xen-guide.xml"
1028 - elog " http://en.gentoo-wiki.com/wiki/Xen/"
1029 -
1030 - if use pae; then
1031 - echo
1032 - ewarn "This is a PAE build of Xen. It will *only* boot PAE kernels!"
1033 - fi
1034 -}
1035
1036 diff --git a/app-emulation/xen-4.1.1-r2.ebuild b/app-emulation/xen-4.1.1-r2.ebuild
1037 deleted file mode 100644
1038 index 4b3a74b..0000000
1039 --- a/app-emulation/xen-4.1.1-r2.ebuild
1040 +++ /dev/null
1041 @@ -1,121 +0,0 @@
1042 -# Copyright 1999-2011 Gentoo Foundation
1043 -# Distributed under the terms of the GNU General Public License v2
1044 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen/xen-4.1.1-r2.ebuild,v 1.7 2011/11/08 23:46:38 mr_bones_ Exp $
1045 -
1046 -EAPI="4"
1047 -
1048 -if [[ $PV == *9999 ]]; then
1049 - KEYWORDS=""
1050 - REPO="xen-unstable.hg"
1051 - EHG_REPO_URI="http://xenbits.xensource.com/${REPO}"
1052 - S="${WORKDIR}/${REPO}"
1053 - live_eclass="mercurial"
1054 -else
1055 - KEYWORDS="amd64 x86"
1056 - SRC_URI="http://bits.xensource.com/oss-xen/release/${PV}/xen-${PV}.tar.gz"
1057 -fi
1058 -
1059 -inherit mount-boot flag-o-matic toolchain-funcs ${live_eclass}
1060 -
1061 -DESCRIPTION="The Xen virtual machine monitor"
1062 -HOMEPAGE="http://xen.org/"
1063 -
1064 -LICENSE="GPL-2"
1065 -SLOT="0"
1066 -IUSE="custom-cflags debug flask pae xsm"
1067 -
1068 -RDEPEND="|| ( sys-boot/grub
1069 - sys-boot/grub-static )"
1070 -PDEPEND="~app-emulation/xen-tools-${PV}"
1071 -
1072 -RESTRICT="test"
1073 -
1074 -# Approved by QA team in bug #144032
1075 -QA_WX_LOAD="boot/xen-syms-${PV}"
1076 -
1077 -REQUIRED_USE="
1078 - flask? ( xsm )
1079 - "
1080 -
1081 -pkg_setup() {
1082 - if [[ -z ${XEN_TARGET_ARCH} ]]; then
1083 - if use x86 && use amd64; then
1084 - die "Confusion! Both x86 and amd64 are set in your use flags!"
1085 - elif use x86; then
1086 - export XEN_TARGET_ARCH="x86_32"
1087 - elif use amd64; then
1088 - export XEN_TARGET_ARCH="x86_64"
1089 - else
1090 - die "Unsupported architecture!"
1091 - fi
1092 - fi
1093 -
1094 - if use flask ; then
1095 - export "XSM_ENABLE=y"
1096 - export "FLASK_ENABLE=y"
1097 - elif use xsm ; then
1098 - export "XSM_ENABLE=y"
1099 - fi
1100 -}
1101 -
1102 -src_prepare() {
1103 - # Drop .config
1104 - sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
1105 - # if the user *really* wants to use their own custom-cflags, let them
1106 - if use custom-cflags; then
1107 - einfo "User wants their own CFLAGS - removing defaults"
1108 - # try and remove all the default custom-cflags
1109 - find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk -exec sed \
1110 - -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
1111 - -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
1112 - -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
1113 - -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
1114 - -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
1115 - -i {} \; || die "failed to set custom-cflags"
1116 - fi
1117 -
1118 - # remove -Werror for gcc-4.6's sake
1119 - find "${S}" -name 'Makefile*' -o -name '*.mk' -o -name 'common.make' | \
1120 - xargs sed -i 's/ *-Werror */ /' || die "failed to remove -Werror"
1121 - # not strictly necessary to fix this
1122 - sed -i 's/, "-Werror"//' "${S}/tools/python/setup.py" || die "failed to remove -Werror on setup.py"
1123 -
1124 - # Add sccurity fix bug #379241
1125 - epatch "${FILESDIR}/${P}-iommu_sec_fix.patch"
1126 -}
1127 -
1128 -src_configure() {
1129 - use debug && myopt="${myopt} debug=y"
1130 - use pae && myopt="${myopt} pae=y"
1131 -
1132 - if use custom-cflags; then
1133 - filter-flags -fPIE -fstack-protector
1134 - replace-flags -O3 -O2
1135 - else
1136 - unset CFLAGS
1137 - fi
1138 -}
1139 -
1140 -src_compile() {
1141 - # Send raw LDFLAGS so that --as-needed works
1142 - emake CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" -C xen ${myopt}
1143 -}
1144 -
1145 -src_install() {
1146 - local myopt
1147 - use debug && myopt="${myopt} debug=y"
1148 - use pae && myopt="${myopt} pae=y"
1149 -
1150 - emake LDFLAGS="$(raw-ldflags)" DESTDIR="${D}" -C xen ${myopt} install
1151 -}
1152 -
1153 -pkg_postinst() {
1154 - elog "Official Xen Guide and the unoffical wiki page:"
1155 - elog " http://www.gentoo.org/doc/en/xen-guide.xml"
1156 - elog " http://en.gentoo-wiki.com/wiki/Xen/"
1157 -
1158 - if use pae; then
1159 - echo
1160 - ewarn "This is a PAE build of Xen. It will *only* boot PAE kernels!"
1161 - fi
1162 -}
1163
1164 diff --git a/app-emulation/xen-9999.ebuild b/app-emulation/xen-9999.ebuild
1165 deleted file mode 100644
1166 index c3e1126..0000000
1167 --- a/app-emulation/xen-9999.ebuild
1168 +++ /dev/null
1169 @@ -1,117 +0,0 @@
1170 -# Copyright 1999-2011 Gentoo Foundation
1171 -# Distributed under the terms of the GNU General Public License v2
1172 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen/xen-9999.ebuild,v 1.4 2011/09/11 14:48:15 alexxy Exp $
1173 -
1174 -EAPI="4"
1175 -
1176 -if [[ $PV == *9999 ]]; then
1177 - KEYWORDS=""
1178 - REPO="xen-unstable.hg"
1179 - EHG_REPO_URI="http://xenbits.xensource.com/${REPO}"
1180 - S="${WORKDIR}/${REPO}"
1181 - live_eclass="mercurial"
1182 -else
1183 - KEYWORDS="~amd64 ~x86"
1184 - SRC_URI="http://bits.xensource.com/oss-xen/release/${PV}/xen-${PV}.tar.gz"
1185 -fi
1186 -
1187 -inherit mount-boot flag-o-matic toolchain-funcs ${live_eclass}
1188 -
1189 -DESCRIPTION="The Xen virtual machine monitor"
1190 -HOMEPAGE="http://xen.org/"
1191 -
1192 -LICENSE="GPL-2"
1193 -SLOT="0"
1194 -IUSE="custom-cflags debug flask pae xsm"
1195 -
1196 -RDEPEND="|| ( sys-boot/grub
1197 - sys-boot/grub-static )"
1198 -PDEPEND="~app-emulation/xen-tools-${PV}"
1199 -
1200 -RESTRICT="test"
1201 -
1202 -# Approved by QA team in bug #144032
1203 -QA_WX_LOAD="boot/xen-syms-${PV}"
1204 -
1205 -REQUIRED_USE="flask? ( xsm )"
1206 -
1207 -pkg_setup() {
1208 - if [[ -z ${XEN_TARGET_ARCH} ]]; then
1209 - if use x86 && use amd64; then
1210 - die "Confusion! Both x86 and amd64 are set in your use flags!"
1211 - elif use x86; then
1212 - export XEN_TARGET_ARCH="x86_32"
1213 - elif use amd64; then
1214 - export XEN_TARGET_ARCH="x86_64"
1215 - else
1216 - die "Unsupported architecture!"
1217 - fi
1218 - fi
1219 -
1220 - if use flask ; then
1221 - export "XSM_ENABLE=y"
1222 - export "FLASK_ENABLE=y"
1223 - elif use xsm ; then
1224 - export "XSM_ENABLE=y"
1225 - fi
1226 -}
1227 -
1228 -src_prepare() {
1229 - # Drop .config
1230 - sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
1231 -
1232 - # if the user *really* wants to use their own custom-cflags, let them
1233 - if use custom-cflags; then
1234 - einfo "User wants their own CFLAGS - removing defaults"
1235 - # try and remove all the default custom-cflags
1236 - find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk -exec sed \
1237 - -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
1238 - -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
1239 - -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
1240 - -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
1241 - -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
1242 - -i {} \;
1243 - fi
1244 -
1245 - # remove -Werror for gcc-4.6's sake
1246 - find "${S}" -name 'Makefile*' -o -name '*.mk' -o -name 'common.make' | \
1247 - xargs sed -i 's/ *-Werror */ /'
1248 - # not strictly necessary to fix this
1249 - sed -i 's/, "-Werror"//' "${S}/tools/python/setup.py" || die "failed to re-set setup.py"
1250 -}
1251 -
1252 -src_configure() {
1253 - use debug && myopt="${myopt} debug=y"
1254 - use pae && myopt="${myopt} pae=y"
1255 -
1256 - if use custom-cflags; then
1257 - filter-flags -fPIE -fstack-protector
1258 - replace-flags -O3 -O2
1259 - else
1260 - unset CFLAGS
1261 - fi
1262 -}
1263 -
1264 -src_compile() {
1265 - # Send raw LDFLAGS so that --as-needed works
1266 - emake CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" -C xen ${myopt}
1267 -}
1268 -
1269 -src_install() {
1270 - local myopt
1271 - use debug && myopt="${myopt} debug=y"
1272 - use pae && myopt="${myopt} pae=y"
1273 -
1274 - emake LDFLAGS="$(raw-ldflags)" DESTDIR="${D}" -C xen ${myopt} install
1275 -}
1276 -
1277 -pkg_postinst() {
1278 - elog "Official Xen Guide and the unoffical wiki page:"
1279 - elog " http://www.gentoo.org/doc/en/xen-guide.xml"
1280 - elog " http://en.gentoo-wiki.com/wiki/Xen/"
1281 -
1282 - if use pae; then
1283 - echo
1284 - ewarn "This is a PAE build of Xen. It will *only* boot PAE kernels!"
1285 - fi
1286 -}