summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorYi Zhao <yi.zhao@windriver.com>2017-09-21 08:34:36 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-09-22 17:15:30 +0100
commitbbe55428976d1f486bf232f654cc055b87e369e0 (patch)
tree65a80de146c07ac11840eaa1118818d6c8f15c41 /meta/recipes-devtools
parent08752aa58f69fdc09c8c3defe58be2f174ebf28e (diff)
downloadpoky-bbe55428976d1f486bf232f654cc055b87e369e0.tar.gz
qemu: remove unused patches
Remove the following patches since they are unused after qemu update to 2.10: 0001-replace-struct-ucontext-with-ucontext_t-type.patch CVE-2016-9908.patch CVE-2016-9912.patch configure-fix-Darwin-target-detection.patch (From OE-Core rev: d303f61e28b0ecc2352739a07680bfdeb3544080) Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/qemu/qemu/0001-replace-struct-ucontext-with-ucontext_t-type.patch265
-rw-r--r--meta/recipes-devtools/qemu/qemu/CVE-2016-9908.patch44
-rw-r--r--meta/recipes-devtools/qemu/qemu/CVE-2016-9912.patch45
-rw-r--r--meta/recipes-devtools/qemu/qemu/configure-fix-Darwin-target-detection.patch32
4 files changed, 0 insertions, 386 deletions
diff --git a/meta/recipes-devtools/qemu/qemu/0001-replace-struct-ucontext-with-ucontext_t-type.patch b/meta/recipes-devtools/qemu/qemu/0001-replace-struct-ucontext-with-ucontext_t-type.patch
deleted file mode 100644
index c3eb543ec0..0000000000
--- a/meta/recipes-devtools/qemu/qemu/0001-replace-struct-ucontext-with-ucontext_t-type.patch
+++ /dev/null
@@ -1,265 +0,0 @@
1From 80954c03163fdbf8b905595a69008093096ee2f6 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 28 Jun 2017 13:28:37 -0700
4Subject: [PATCH] replace struct ucontext with ucontext_t type
5
6The ucontext_t type had a tag struct ucontext until now
7but newer glibc will drop it so we need to adjust and use
8the exposed type instead
9
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11Cc: Kamil Rytarowski <kamil@netbsd.org>
12Cc: Riku Voipio <riku.voipio@iki.fi>
13Cc: Laurent Vivier <laurent@vivier.eu>
14Cc: Paolo Bonzini <pbonzini@redhat.com>
15
16Upstream-Status: Submitted
17---
18 linux-user/host/aarch64/hostdep.h | 2 +-
19 linux-user/host/arm/hostdep.h | 2 +-
20 linux-user/host/i386/hostdep.h | 2 +-
21 linux-user/host/ppc64/hostdep.h | 2 +-
22 linux-user/host/s390x/hostdep.h | 2 +-
23 linux-user/host/x86_64/hostdep.h | 2 +-
24 linux-user/signal.c | 10 +++++-----
25 tests/tcg/test-i386.c | 4 ++--
26 user-exec.c | 18 +++++++++---------
27 9 files changed, 22 insertions(+), 22 deletions(-)
28
29diff --git a/linux-user/host/aarch64/hostdep.h b/linux-user/host/aarch64/hostdep.h
30index 64f75cef49..a8d41a21ad 100644
31--- a/linux-user/host/aarch64/hostdep.h
32+++ b/linux-user/host/aarch64/hostdep.h
33@@ -24,7 +24,7 @@ extern char safe_syscall_end[];
34 /* Adjust the signal context to rewind out of safe-syscall if we're in it */
35 static inline void rewind_if_in_safe_syscall(void *puc)
36 {
37- struct ucontext *uc = puc;
38+ ucontext_t *uc = puc;
39 __u64 *pcreg = &uc->uc_mcontext.pc;
40
41 if (*pcreg > (uintptr_t)safe_syscall_start
42diff --git a/linux-user/host/arm/hostdep.h b/linux-user/host/arm/hostdep.h
43index 5c1ae60120..9276fe6ceb 100644
44--- a/linux-user/host/arm/hostdep.h
45+++ b/linux-user/host/arm/hostdep.h
46@@ -24,7 +24,7 @@ extern char safe_syscall_end[];
47 /* Adjust the signal context to rewind out of safe-syscall if we're in it */
48 static inline void rewind_if_in_safe_syscall(void *puc)
49 {
50- struct ucontext *uc = puc;
51+ ucontext_t *uc = puc;
52 unsigned long *pcreg = &uc->uc_mcontext.arm_pc;
53
54 if (*pcreg > (uintptr_t)safe_syscall_start
55diff --git a/linux-user/host/i386/hostdep.h b/linux-user/host/i386/hostdep.h
56index d834bd80ea..073be74d87 100644
57--- a/linux-user/host/i386/hostdep.h
58+++ b/linux-user/host/i386/hostdep.h
59@@ -24,7 +24,7 @@ extern char safe_syscall_end[];
60 /* Adjust the signal context to rewind out of safe-syscall if we're in it */
61 static inline void rewind_if_in_safe_syscall(void *puc)
62 {
63- struct ucontext *uc = puc;
64+ ucontext_t *uc = puc;
65 greg_t *pcreg = &uc->uc_mcontext.gregs[REG_EIP];
66
67 if (*pcreg > (uintptr_t)safe_syscall_start
68diff --git a/linux-user/host/ppc64/hostdep.h b/linux-user/host/ppc64/hostdep.h
69index 0b0f5f7821..98979ad917 100644
70--- a/linux-user/host/ppc64/hostdep.h
71+++ b/linux-user/host/ppc64/hostdep.h
72@@ -24,7 +24,7 @@ extern char safe_syscall_end[];
73 /* Adjust the signal context to rewind out of safe-syscall if we're in it */
74 static inline void rewind_if_in_safe_syscall(void *puc)
75 {
76- struct ucontext *uc = puc;
77+ ucontext_t *uc = puc;
78 unsigned long *pcreg = &uc->uc_mcontext.gp_regs[PT_NIP];
79
80 if (*pcreg > (uintptr_t)safe_syscall_start
81diff --git a/linux-user/host/s390x/hostdep.h b/linux-user/host/s390x/hostdep.h
82index 6f9da9c608..4f0171f36f 100644
83--- a/linux-user/host/s390x/hostdep.h
84+++ b/linux-user/host/s390x/hostdep.h
85@@ -24,7 +24,7 @@ extern char safe_syscall_end[];
86 /* Adjust the signal context to rewind out of safe-syscall if we're in it */
87 static inline void rewind_if_in_safe_syscall(void *puc)
88 {
89- struct ucontext *uc = puc;
90+ ucontext_t *uc = puc;
91 unsigned long *pcreg = &uc->uc_mcontext.psw.addr;
92
93 if (*pcreg > (uintptr_t)safe_syscall_start
94diff --git a/linux-user/host/x86_64/hostdep.h b/linux-user/host/x86_64/hostdep.h
95index 3b4259633e..a4fefb5114 100644
96--- a/linux-user/host/x86_64/hostdep.h
97+++ b/linux-user/host/x86_64/hostdep.h
98@@ -24,7 +24,7 @@ extern char safe_syscall_end[];
99 /* Adjust the signal context to rewind out of safe-syscall if we're in it */
100 static inline void rewind_if_in_safe_syscall(void *puc)
101 {
102- struct ucontext *uc = puc;
103+ ucontext_t *uc = puc;
104 greg_t *pcreg = &uc->uc_mcontext.gregs[REG_RIP];
105
106 if (*pcreg > (uintptr_t)safe_syscall_start
107diff --git a/linux-user/signal.c b/linux-user/signal.c
108index c750053edd..4638123dd8 100644
109--- a/linux-user/signal.c
110+++ b/linux-user/signal.c
111@@ -3170,7 +3170,7 @@ static void setup_rt_frame(int sig, struct target_sigaction *ka,
112 *
113 * a0 = signal number
114 * a1 = pointer to siginfo_t
115- * a2 = pointer to struct ucontext
116+ * a2 = pointer to ucontext_t
117 *
118 * $25 and PC point to the signal handler, $29 points to the
119 * struct sigframe.
120@@ -3557,7 +3557,7 @@ struct target_signal_frame {
121
122 struct rt_signal_frame {
123 siginfo_t info;
124- struct ucontext uc;
125+ ucontext_t uc;
126 uint32_t tramp[2];
127 };
128
129@@ -3773,7 +3773,7 @@ struct rt_signal_frame {
130 siginfo_t *pinfo;
131 void *puc;
132 siginfo_t info;
133- struct ucontext uc;
134+ ucontext_t uc;
135 uint16_t retcode[4]; /* Trampoline code. */
136 };
137
138@@ -4074,7 +4074,7 @@ static void setup_rt_frame(int sig, struct target_sigaction *ka,
139 tswap_siginfo(&frame->info, info);
140 }
141
142- /*err |= __clear_user(&frame->uc, offsetof(struct ucontext, uc_mcontext));*/
143+ /*err |= __clear_user(&frame->uc, offsetof(ucontext_t, uc_mcontext));*/
144 __put_user(0, &frame->uc.tuc_flags);
145 __put_user(0, &frame->uc.tuc_link);
146 __put_user(target_sigaltstack_used.ss_sp,
147@@ -4565,7 +4565,7 @@ enum {
148
149 struct target_ucontext {
150 target_ulong tuc_flags;
151- target_ulong tuc_link; /* struct ucontext __user * */
152+ target_ulong tuc_link; /* ucontext_t __user * */
153 struct target_sigaltstack tuc_stack;
154 #if !defined(TARGET_PPC64)
155 int32_t tuc_pad[7];
156diff --git a/tests/tcg/test-i386.c b/tests/tcg/test-i386.c
157index 0f7b943b0c..9599204895 100644
158--- a/tests/tcg/test-i386.c
159+++ b/tests/tcg/test-i386.c
160@@ -1720,7 +1720,7 @@ int tab[2];
161
162 void sig_handler(int sig, siginfo_t *info, void *puc)
163 {
164- struct ucontext *uc = puc;
165+ ucontext_t *uc = puc;
166
167 printf("si_signo=%d si_errno=%d si_code=%d",
168 info->si_signo, info->si_errno, info->si_code);
169@@ -1912,7 +1912,7 @@ void test_exceptions(void)
170 /* specific precise single step test */
171 void sig_trap_handler(int sig, siginfo_t *info, void *puc)
172 {
173- struct ucontext *uc = puc;
174+ ucontext_t *uc = puc;
175 printf("EIP=" FMTLX "\n", (long)uc->uc_mcontext.gregs[REG_EIP]);
176 }
177
178diff --git a/user-exec.c b/user-exec.c
179index 6db075884d..3f1b899e3d 100644
180--- a/user-exec.c
181+++ b/user-exec.c
182@@ -155,7 +155,7 @@ int cpu_signal_handler(int host_signum, void *pinfo,
183 #elif defined(__OpenBSD__)
184 struct sigcontext *uc = puc;
185 #else
186- struct ucontext *uc = puc;
187+ ucontext_t *uc = puc;
188 #endif
189 unsigned long pc;
190 int trapno;
191@@ -210,7 +210,7 @@ int cpu_signal_handler(int host_signum, void *pinfo,
192 #elif defined(__OpenBSD__)
193 struct sigcontext *uc = puc;
194 #else
195- struct ucontext *uc = puc;
196+ ucontext_t *uc = puc;
197 #endif
198
199 pc = PC_sig(uc);
200@@ -277,7 +277,7 @@ int cpu_signal_handler(int host_signum, void *pinfo,
201 #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
202 ucontext_t *uc = puc;
203 #else
204- struct ucontext *uc = puc;
205+ ucontext_t *uc = puc;
206 #endif
207 unsigned long pc;
208 int is_write;
209@@ -304,7 +304,7 @@ int cpu_signal_handler(int host_signum, void *pinfo,
210 void *puc)
211 {
212 siginfo_t *info = pinfo;
213- struct ucontext *uc = puc;
214+ ucontext_t *uc = puc;
215 uint32_t *pc = uc->uc_mcontext.sc_pc;
216 uint32_t insn = *pc;
217 int is_write = 0;
218@@ -402,7 +402,7 @@ int cpu_signal_handler(int host_signum, void *pinfo,
219 #if defined(__NetBSD__)
220 ucontext_t *uc = puc;
221 #else
222- struct ucontext *uc = puc;
223+ ucontext_t *uc = puc;
224 #endif
225 unsigned long pc;
226 int is_write;
227@@ -429,7 +429,7 @@ int cpu_signal_handler(int host_signum, void *pinfo,
228 int cpu_signal_handler(int host_signum, void *pinfo, void *puc)
229 {
230 siginfo_t *info = pinfo;
231- struct ucontext *uc = puc;
232+ ucontext_t *uc = puc;
233 uintptr_t pc = uc->uc_mcontext.pc;
234 uint32_t insn = *(uint32_t *)pc;
235 bool is_write;
236@@ -462,7 +462,7 @@ int cpu_signal_handler(int host_signum, void *pinfo, void *puc)
237 int cpu_signal_handler(int host_signum, void *pinfo, void *puc)
238 {
239 siginfo_t *info = pinfo;
240- struct ucontext *uc = puc;
241+ ucontext_t *uc = puc;
242 unsigned long ip;
243 int is_write = 0;
244
245@@ -493,7 +493,7 @@ int cpu_signal_handler(int host_signum, void *pinfo,
246 void *puc)
247 {
248 siginfo_t *info = pinfo;
249- struct ucontext *uc = puc;
250+ ucontext_t *uc = puc;
251 unsigned long pc;
252 uint16_t *pinsn;
253 int is_write = 0;
254@@ -546,7 +546,7 @@ int cpu_signal_handler(int host_signum, void *pinfo,
255 void *puc)
256 {
257 siginfo_t *info = pinfo;
258- struct ucontext *uc = puc;
259+ ucontext_t *uc = puc;
260 greg_t pc = uc->uc_mcontext.pc;
261 int is_write;
262
263--
2642.13.2
265
diff --git a/meta/recipes-devtools/qemu/qemu/CVE-2016-9908.patch b/meta/recipes-devtools/qemu/qemu/CVE-2016-9908.patch
deleted file mode 100644
index e0f7a1a3fd..0000000000
--- a/meta/recipes-devtools/qemu/qemu/CVE-2016-9908.patch
+++ /dev/null
@@ -1,44 +0,0 @@
1From 7139ccbc907441337b4b59cde2c5b5a54cb5b2cc Mon Sep 17 00:00:00 2001
2From: Sona Sarmadi <sona.sarmadi@enea.com>
3
4virtio-gpu: fix information leak in capset get dispatch
5
6In virgl_cmd_get_capset function, it uses g_malloc to allocate
7a response struct to the guest. As the 'resp'struct hasn't been full
8initialized it will lead the 'resp->padding' field to the guest.
9Use g_malloc0 to avoid this.
10
11Signed-off-by: Li Qiang <liqiang6-s@360.cn>
12Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
13Message-id: 58188cae.4a6ec20a.3d2d1.aff2@mx.google.com
14
15[Sona: backported from master to v2.8.0 and resolved conflict]
16
17Reference to upstream patch:
18http://git.qemu-project.org/?p=qemu.git;a=commit;h=85d9d044471f93c48c5c396f7e217b4ef12f69f8
19
20CVE: CVE-2016-9908
21Upstream-Status: Backport
22
23Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
24Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
25---
26 hw/display/virtio-gpu-3d.c | 2 +-
27 1 file changed, 1 insertion(+), 1 deletion(-)
28
29diff --git a/hw/display/virtio-gpu-3d.c b/hw/display/virtio-gpu-3d.c
30index 23f39de..d98b140 100644
31--- a/hw/display/virtio-gpu-3d.c
32+++ b/hw/display/virtio-gpu-3d.c
33@@ -371,7 +371,7 @@ static void virgl_cmd_get_capset(VirtIOGPU *g,
34
35 virgl_renderer_get_cap_set(gc.capset_id, &max_ver,
36 &max_size);
37- resp = g_malloc(sizeof(*resp) + max_size);
38+ resp = g_malloc0(sizeof(*resp) + max_size);
39
40 resp->hdr.type = VIRTIO_GPU_RESP_OK_CAPSET;
41 virgl_renderer_fill_caps(gc.capset_id,
42--
431.9.1
44
diff --git a/meta/recipes-devtools/qemu/qemu/CVE-2016-9912.patch b/meta/recipes-devtools/qemu/qemu/CVE-2016-9912.patch
deleted file mode 100644
index c009ffd96a..0000000000
--- a/meta/recipes-devtools/qemu/qemu/CVE-2016-9912.patch
+++ /dev/null
@@ -1,45 +0,0 @@
1From b8e23926c568f2e963af39028b71c472e3023793 Mon Sep 17 00:00:00 2001
2From: Li Qiang <liq3ea@gmail.com>
3Date: Mon, 28 Nov 2016 21:29:25 -0500
4Subject: [PATCH] virtio-gpu: call cleanup mapping function in resource destroy
5
6If the guest destroy the resource before detach banking, the 'iov'
7and 'addrs' field in resource is not freed thus leading memory
8leak issue. This patch avoid this.
9
10CVE: CVE-2016-9912
11Upstream-Status: Backport
12
13Signed-off-by: Li Qiang <liq3ea@gmail.com>
14Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
15Message-id: 1480386565-10077-1-git-send-email-liq3ea@gmail.com
16Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
17Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
18---
19 hw/display/virtio-gpu.c | 3 +++
20 1 file changed, 3 insertions(+)
21
22diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
23index ed2b6d3..6a26258 100644
24--- a/hw/display/virtio-gpu.c
25+++ b/hw/display/virtio-gpu.c
26@@ -28,6 +28,8 @@
27 static struct virtio_gpu_simple_resource*
28 virtio_gpu_find_resource(VirtIOGPU *g, uint32_t resource_id);
29
30+static void virtio_gpu_cleanup_mapping(struct virtio_gpu_simple_resource *res);
31+
32 #ifdef CONFIG_VIRGL
33 #include <virglrenderer.h>
34 #define VIRGL(_g, _virgl, _simple, ...) \
35@@ -364,6 +366,7 @@ static void virtio_gpu_resource_destroy(VirtIOGPU *g,
36 struct virtio_gpu_simple_resource *res)
37 {
38 pixman_image_unref(res->image);
39+ virtio_gpu_cleanup_mapping(res);
40 QTAILQ_REMOVE(&g->reslist, res, next);
41 g->hostmem -= res->hostmem;
42 g_free(res);
43--
441.9.1
45
diff --git a/meta/recipes-devtools/qemu/qemu/configure-fix-Darwin-target-detection.patch b/meta/recipes-devtools/qemu/qemu/configure-fix-Darwin-target-detection.patch
deleted file mode 100644
index 59cdc1c304..0000000000
--- a/meta/recipes-devtools/qemu/qemu/configure-fix-Darwin-target-detection.patch
+++ /dev/null
@@ -1,32 +0,0 @@
1Upstream-Status: Pending
2Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
3
4From 9ac096d8eccf2d56ece646320c282c8369f8337c Mon Sep 17 00:00:00 2001
5From: Cristian Iorga <cristian.iorga@intel.com>
6Date: Tue, 29 Jul 2014 18:35:59 +0300
7Subject: [PATCH] configure: fix Darwin target detection
8
9fix Darwin target detection for qemu
10cross-compilation.
11
12Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
13---
14 configure | 2 ++
15 1 file changed, 2 insertions(+)
16
17diff --git a/configure b/configure
18index 283c71c..1c66a11 100755
19--- a/configure
20+++ b/configure
21@@ -444,6 +444,8 @@ elif check_define __sun__ ; then
22 targetos='SunOS'
23 elif check_define __HAIKU__ ; then
24 targetos='Haiku'
25+elif check_define __APPLE__ ; then
26+ targetos='Darwin'
27 else
28 targetos=`uname -s`
29 fi
30--
311.9.1
32