summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/qemu/qemu/0009-Fix-webkitgtk-builds.patch
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-08-13 14:44:42 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-08-17 08:45:35 +0100
commit7e25a6b4d52a16e812dfd444d65283d2c75d2d77 (patch)
tree1f61c98c9d24ed35b685af62bcdb1d83a36b80f9 /meta/recipes-devtools/qemu/qemu/0009-Fix-webkitgtk-builds.patch
parent1bff01bda9741ad3a9b9e1937d73859636575c7c (diff)
downloadpoky-7e25a6b4d52a16e812dfd444d65283d2c75d2d77.tar.gz
qemu: Upgrade 5.0.0 -> 5.1.0
* Drop backported CVE fixes * Drop cpu backtrace patch from 2015 for debugging an issue which we no longer see (patch throws rejects, files have moved) * Update mips patch to account for file renames * Update chardev patch to match upstream code changes * Update webkitgtk patch, qemumips build works ok but qemux86 musl webkitgtk still fails. Need to figure out the correct fix and upstream it for this, current revert patch is not maintainable. Release notes for 5.1.0 mention slight qemumips performance improvements which would be valuable to us. My tests show no improvement in qemumips testimage execution time for core-image-sato-sdk. Fix a ptest issue for a file looking for /usr/bin/bash when we have /bin/bash. (From OE-Core rev: 686b770af67fdd2251f4ddab5b0eefc8fb0870ef) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/qemu/qemu/0009-Fix-webkitgtk-builds.patch')
-rw-r--r--meta/recipes-devtools/qemu/qemu/0009-Fix-webkitgtk-builds.patch73
1 files changed, 35 insertions, 38 deletions
diff --git a/meta/recipes-devtools/qemu/qemu/0009-Fix-webkitgtk-builds.patch b/meta/recipes-devtools/qemu/qemu/0009-Fix-webkitgtk-builds.patch
index eef3f3f97f..f2a44986b7 100644
--- a/meta/recipes-devtools/qemu/qemu/0009-Fix-webkitgtk-builds.patch
+++ b/meta/recipes-devtools/qemu/qemu/0009-Fix-webkitgtk-builds.patch
@@ -28,29 +28,29 @@ Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com>
28 linux-user/syscall.c | 5 +---- 28 linux-user/syscall.c | 5 +----
29 4 files changed, 10 insertions(+), 23 deletions(-) 29 4 files changed, 10 insertions(+), 23 deletions(-)
30 30
31diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h 31Index: qemu-5.1.0/include/exec/cpu-all.h
32index 49384bb6..93b12519 100644 32===================================================================
33--- a/include/exec/cpu-all.h 33--- qemu-5.1.0.orig/include/exec/cpu-all.h
34+++ b/include/exec/cpu-all.h 34+++ qemu-5.1.0/include/exec/cpu-all.h
35@@ -162,12 +162,8 @@ extern unsigned long guest_base; 35@@ -176,11 +176,8 @@ extern unsigned long reserved_va;
36 extern int have_guest_base; 36 * avoid setting bits at the top of guest addresses that might need
37 extern unsigned long reserved_va; 37 * to be used for tags.
38 38 */
39-#if HOST_LONG_BITS <= TARGET_VIRT_ADDR_SPACE_BITS 39-#define GUEST_ADDR_MAX_ \
40-#define GUEST_ADDR_MAX (~0ul) 40- ((MIN_CONST(TARGET_VIRT_ADDR_SPACE_BITS, TARGET_ABI_BITS) <= 32) ? \
41-#else 41- UINT32_MAX : ~0ul)
42-#define GUEST_ADDR_MAX (reserved_va ? reserved_va - 1 : \ 42-#define GUEST_ADDR_MAX (reserved_va ? reserved_va - 1 : GUEST_ADDR_MAX_)
43-
43+#define GUEST_ADDR_MAX (reserved_va ? reserved_va : \ 44+#define GUEST_ADDR_MAX (reserved_va ? reserved_va : \
44 (1ul << TARGET_VIRT_ADDR_SPACE_BITS) - 1) 45+ (1ul << TARGET_VIRT_ADDR_SPACE_BITS) - 1)
45-#endif
46 #else 46 #else
47 47
48 #include "exec/hwaddr.h" 48 #include "exec/hwaddr.h"
49diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h 49Index: qemu-5.1.0/include/exec/cpu_ldst.h
50index 53de1975..cf19ed2e 100644 50===================================================================
51--- a/include/exec/cpu_ldst.h 51--- qemu-5.1.0.orig/include/exec/cpu_ldst.h
52+++ b/include/exec/cpu_ldst.h 52+++ qemu-5.1.0/include/exec/cpu_ldst.h
53@@ -70,7 +70,10 @@ typedef uint64_t abi_ptr; 53@@ -75,7 +75,10 @@ typedef uint64_t abi_ptr;
54 #if HOST_LONG_BITS <= TARGET_VIRT_ADDR_SPACE_BITS 54 #if HOST_LONG_BITS <= TARGET_VIRT_ADDR_SPACE_BITS
55 #define guest_addr_valid(x) (1) 55 #define guest_addr_valid(x) (1)
56 #else 56 #else
@@ -62,11 +62,11 @@ index 53de1975..cf19ed2e 100644
62 #endif 62 #endif
63 #define h2g_valid(x) guest_addr_valid((unsigned long)(x) - guest_base) 63 #define h2g_valid(x) guest_addr_valid((unsigned long)(x) - guest_base)
64 64
65diff --git a/linux-user/mmap.c b/linux-user/mmap.c 65Index: qemu-5.1.0/linux-user/mmap.c
66index e3780337..1d4aba95 100644 66===================================================================
67--- a/linux-user/mmap.c 67--- qemu-5.1.0.orig/linux-user/mmap.c
68+++ b/linux-user/mmap.c 68+++ qemu-5.1.0/linux-user/mmap.c
69@@ -71,7 +71,7 @@ int target_mprotect(abi_ulong start, abi_ulong len, int prot) 69@@ -71,7 +71,7 @@ int target_mprotect(abi_ulong start, abi
70 return -TARGET_EINVAL; 70 return -TARGET_EINVAL;
71 len = TARGET_PAGE_ALIGN(len); 71 len = TARGET_PAGE_ALIGN(len);
72 end = start + len; 72 end = start + len;
@@ -75,18 +75,18 @@ index e3780337..1d4aba95 100644
75 return -TARGET_ENOMEM; 75 return -TARGET_ENOMEM;
76 } 76 }
77 prot &= PROT_READ | PROT_WRITE | PROT_EXEC; 77 prot &= PROT_READ | PROT_WRITE | PROT_EXEC;
78@@ -467,8 +467,8 @@ abi_long target_mmap(abi_ulong start, abi_ulong len, int prot, 78@@ -467,8 +467,8 @@ abi_long target_mmap(abi_ulong start, ab
79 * It can fail only on 64-bit host with 32-bit target. 79 * It can fail only on 64-bit host with 32-bit target.
80 * On any other target/host host mmap() handles this error correctly. 80 * On any other target/host host mmap() handles this error correctly.
81 */ 81 */
82- if (!guest_range_valid(start, len)) { 82- if (end < start || !guest_range_valid(start, len)) {
83- errno = ENOMEM; 83- errno = ENOMEM;
84+ if ((unsigned long)start + len - 1 > (abi_ulong) -1) { 84+ if (end < start || ((unsigned long)start + len - 1 > (abi_ulong) -1)) {
85+ errno = EINVAL; 85+ errno = EINVAL;
86 goto fail; 86 goto fail;
87 } 87 }
88 88
89@@ -604,10 +604,8 @@ int target_munmap(abi_ulong start, abi_ulong len) 89@@ -604,10 +604,8 @@ int target_munmap(abi_ulong start, abi_u
90 if (start & ~TARGET_PAGE_MASK) 90 if (start & ~TARGET_PAGE_MASK)
91 return -TARGET_EINVAL; 91 return -TARGET_EINVAL;
92 len = TARGET_PAGE_ALIGN(len); 92 len = TARGET_PAGE_ALIGN(len);
@@ -98,7 +98,7 @@ index e3780337..1d4aba95 100644
98 mmap_lock(); 98 mmap_lock();
99 end = start + len; 99 end = start + len;
100 real_start = start & qemu_host_page_mask; 100 real_start = start & qemu_host_page_mask;
101@@ -662,13 +660,6 @@ abi_long target_mremap(abi_ulong old_addr, abi_ulong old_size, 101@@ -662,13 +660,6 @@ abi_long target_mremap(abi_ulong old_add
102 int prot; 102 int prot;
103 void *host_addr; 103 void *host_addr;
104 104
@@ -112,11 +112,11 @@ index e3780337..1d4aba95 100644
112 mmap_lock(); 112 mmap_lock();
113 113
114 if (flags & MREMAP_FIXED) { 114 if (flags & MREMAP_FIXED) {
115diff --git a/linux-user/syscall.c b/linux-user/syscall.c 115Index: qemu-5.1.0/linux-user/syscall.c
116index 05f03919..d6f8cc97 100644 116===================================================================
117--- a/linux-user/syscall.c 117--- qemu-5.1.0.orig/linux-user/syscall.c
118+++ b/linux-user/syscall.c 118+++ qemu-5.1.0/linux-user/syscall.c
119@@ -4287,9 +4287,6 @@ static inline abi_ulong do_shmat(CPUArchState *cpu_env, 119@@ -4336,9 +4336,6 @@ static inline abi_ulong do_shmat(CPUArch
120 return -TARGET_EINVAL; 120 return -TARGET_EINVAL;
121 } 121 }
122 } 122 }
@@ -126,7 +126,7 @@ index 05f03919..d6f8cc97 100644
126 126
127 mmap_lock(); 127 mmap_lock();
128 128
129@@ -7247,7 +7244,7 @@ static int open_self_maps(void *cpu_env, int fd) 129@@ -7376,7 +7373,7 @@ static int open_self_maps(void *cpu_env,
130 const char *path; 130 const char *path;
131 131
132 max = h2g_valid(max - 1) ? 132 max = h2g_valid(max - 1) ?
@@ -135,6 +135,3 @@ index 05f03919..d6f8cc97 100644
135 135
136 if (page_check_range(h2g(min), max - min, flags) == -1) { 136 if (page_check_range(h2g(min), max - min, flags) == -1) {
137 continue; 137 continue;
138--
1392.24.0
140