summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2017-06-28 21:59:04 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-07-06 14:38:14 +0100
commitca3886ac9601c12d22e838c41f65fd886f8d4a45 (patch)
tree54c8b75939f5d7753b6c3331166d51fb5896660b
parent451c4649bbf384cd80af7a1552dc1f656ed2ce90 (diff)
downloadpoky-ca3886ac9601c12d22e838c41f65fd886f8d4a45.tar.gz
qemu: Replace use of struct ucontext with ucontext_t
(From OE-Core rev: 03b068881cc22d40c63bb23405b37ce9277460f1) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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_2.8.1.1.bb46
2 files changed, 286 insertions, 25 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
new file mode 100644
index 0000000000..c3eb543ec0
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/0001-replace-struct-ucontext-with-ucontext_t-type.patch
@@ -0,0 +1,265 @@
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_2.8.1.1.bb b/meta/recipes-devtools/qemu/qemu_2.8.1.1.bb
index d37dd49064..a5dc70469d 100644
--- a/meta/recipes-devtools/qemu/qemu_2.8.1.1.bb
+++ b/meta/recipes-devtools/qemu/qemu_2.8.1.1.bb
@@ -7,37 +7,33 @@ RDEPENDS_${PN}-ptest = "bash make"
7LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \ 7LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
8 file://COPYING.LIB;endline=24;md5=c04def7ae38850e7d3ef548588159913" 8 file://COPYING.LIB;endline=24;md5=c04def7ae38850e7d3ef548588159913"
9 9
10SRC_URI += " \ 10SRC_URI = "http://wiki.qemu-project.org/download/${BP}.tar.bz2 \
11 file://powerpc_rom.bin \ 11 file://powerpc_rom.bin \
12 file://disable-grabs.patch \ 12 file://disable-grabs.patch \
13 file://exclude-some-arm-EABI-obsolete-syscalls.patch \ 13 file://exclude-some-arm-EABI-obsolete-syscalls.patch \
14 file://wacom.patch \ 14 file://wacom.patch \
15 file://add-ptest-in-makefile.patch \ 15 file://add-ptest-in-makefile.patch \
16 file://run-ptest \ 16 file://run-ptest \
17 file://configure-fix-Darwin-target-detection.patch \ 17 file://configure-fix-Darwin-target-detection.patch \
18 file://qemu-enlarge-env-entry-size.patch \ 18 file://qemu-enlarge-env-entry-size.patch \
19 file://no-valgrind.patch \ 19 file://no-valgrind.patch \
20 file://pathlimit.patch \ 20 file://pathlimit.patch \
21 file://qemu-2.5.0-cflags.patch \ 21 file://qemu-2.5.0-cflags.patch \
22 file://glibc-2.25.patch \ 22 file://glibc-2.25.patch \
23" 23 file://0001-Provide-support-for-the-CUSE-TPM.patch \
24 24 file://0002-Introduce-condition-to-notify-waiters-of-completed-c.patch \
25SRC_URI += " \ 25 file://0003-Introduce-condition-in-TPM-backend-for-notification.patch \
26 file://0001-Provide-support-for-the-CUSE-TPM.patch \ 26 file://0004-Add-support-for-VM-suspend-resume-for-TPM-TIS.patch \
27 file://0002-Introduce-condition-to-notify-waiters-of-completed-c.patch \ 27 file://CVE-2016-9908.patch \
28 file://0003-Introduce-condition-in-TPM-backend-for-notification.patch \ 28 file://CVE-2016-9912.patch \
29 file://0004-Add-support-for-VM-suspend-resume-for-TPM-TIS.patch \ 29 file://0001-replace-struct-ucontext-with-ucontext_t-type.patch \
30 file://CVE-2016-9908.patch \ 30 "
31 file://CVE-2016-9912.patch \
32"
33 31
34SRC_URI_append_class-native = " \ 32SRC_URI_append_class-native = " \
35 file://fix-libcap-header-issue-on-some-distro.patch \ 33 file://fix-libcap-header-issue-on-some-distro.patch \
36 file://cpus.c-qemu_cpu_kick_thread_debugging.patch \ 34 file://cpus.c-qemu_cpu_kick_thread_debugging.patch \
37 " 35 "
38 36
39SRC_URI =+ "http://wiki.qemu-project.org/download/${BP}.tar.bz2"
40
41SRC_URI[md5sum] = "a6a23a0c59fd0f8ec564b0fb89a79954" 37SRC_URI[md5sum] = "a6a23a0c59fd0f8ec564b0fb89a79954"
42SRC_URI[sha256sum] = "f62ab18a1fb9ff5b4c81ed44becc945b11581eff777618141bdb787da55d3638" 38SRC_URI[sha256sum] = "f62ab18a1fb9ff5b4c81ed44becc945b11581eff777618141bdb787da55d3638"
43 39