diff options
-rw-r--r-- | meta/recipes-devtools/qemu/qemu/target-ppc-fix-user-mode.patch | 48 | ||||
-rw-r--r-- | meta/recipes-devtools/qemu/qemu_2.8.1.1.bb (renamed from meta/recipes-devtools/qemu/qemu_2.8.0.bb) | 5 |
2 files changed, 2 insertions, 51 deletions
diff --git a/meta/recipes-devtools/qemu/qemu/target-ppc-fix-user-mode.patch b/meta/recipes-devtools/qemu/qemu/target-ppc-fix-user-mode.patch deleted file mode 100644 index ba21e71b0f..0000000000 --- a/meta/recipes-devtools/qemu/qemu/target-ppc-fix-user-mode.patch +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | [Qemu-ppc] [PATCH 1/1] target-ppc, tcg: fix usermode segfault with pthread | ||
2 | |||
3 | From: Sam Bobroff | ||
4 | Subject: [Qemu-ppc] [PATCH 1/1] target-ppc, tcg: fix usermode segfault with pthread_create() | ||
5 | Date: Mon, 30 Jan 2017 16:08:07 +1100 | ||
6 | Programs run under qemu-ppc64 on an x86_64 host currently segfault | ||
7 | if they use pthread_create() due to the adjustment made to the NIP in | ||
8 | commit bd6fefe71cec5a0c7d2be4ac96307f25db56abf9. | ||
9 | |||
10 | This patch changes cpu_loop() to set the NIP back to the | ||
11 | pre-incremented value before calling do_syscall(), which causes the | ||
12 | correct address to be used for the new thread and corrects the fault. | ||
13 | |||
14 | Signed-off-by: Sam Bobroff <address@hidden> | ||
15 | |||
16 | Upstream-Status: Backport | ||
17 | |||
18 | --- | ||
19 | |||
20 | linux-user/main.c | 4 +++- | ||
21 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
22 | |||
23 | diff --git a/linux-user/main.c b/linux-user/main.c | ||
24 | index 30049581ef..b5dee01541 100644 | ||
25 | --- a/linux-user/main.c | ||
26 | +++ b/linux-user/main.c | ||
27 | @@ -1712,18 +1712,20 @@ void cpu_loop(CPUPPCState *env) | ||
28 | * in syscalls. | ||
29 | */ | ||
30 | env->crf[0] &= ~0x1; | ||
31 | + env->nip += 4; | ||
32 | ret = do_syscall(env, env->gpr[0], env->gpr[3], env->gpr[4], | ||
33 | env->gpr[5], env->gpr[6], env->gpr[7], | ||
34 | env->gpr[8], 0, 0); | ||
35 | if (ret == -TARGET_ERESTARTSYS) { | ||
36 | + env->nip -= 4; | ||
37 | break; | ||
38 | } | ||
39 | if (ret == (target_ulong)(-TARGET_QEMU_ESIGRETURN)) { | ||
40 | + env->nip -= 4; | ||
41 | /* Returning from a successful sigreturn syscall. | ||
42 | Avoid corrupting register state. */ | ||
43 | break; | ||
44 | } | ||
45 | - env->nip += 4; | ||
46 | if (ret > (target_ulong)(-515)) { | ||
47 | env->crf[0] |= 0x1; | ||
48 | ret = -ret; | ||
diff --git a/meta/recipes-devtools/qemu/qemu_2.8.0.bb b/meta/recipes-devtools/qemu/qemu_2.8.1.1.bb index 19d7e8f658..d37dd49064 100644 --- a/meta/recipes-devtools/qemu/qemu_2.8.0.bb +++ b/meta/recipes-devtools/qemu/qemu_2.8.1.1.bb | |||
@@ -19,7 +19,6 @@ SRC_URI += " \ | |||
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://target-ppc-fix-user-mode.patch \ | ||
23 | file://glibc-2.25.patch \ | 22 | file://glibc-2.25.patch \ |
24 | " | 23 | " |
25 | 24 | ||
@@ -39,8 +38,8 @@ SRC_URI_append_class-native = " \ | |||
39 | 38 | ||
40 | SRC_URI =+ "http://wiki.qemu-project.org/download/${BP}.tar.bz2" | 39 | SRC_URI =+ "http://wiki.qemu-project.org/download/${BP}.tar.bz2" |
41 | 40 | ||
42 | SRC_URI[md5sum] = "17940dce063b6ce450a12e719a6c9c43" | 41 | SRC_URI[md5sum] = "a6a23a0c59fd0f8ec564b0fb89a79954" |
43 | SRC_URI[sha256sum] = "dafd5d7f649907b6b617b822692f4c82e60cf29bc0fc58bc2036219b591e5e62" | 42 | SRC_URI[sha256sum] = "f62ab18a1fb9ff5b4c81ed44becc945b11581eff777618141bdb787da55d3638" |
44 | 43 | ||
45 | COMPATIBLE_HOST_mipsarchn32 = "null" | 44 | COMPATIBLE_HOST_mipsarchn32 = "null" |
46 | COMPATIBLE_HOST_mipsarchn64 = "null" | 45 | COMPATIBLE_HOST_mipsarchn64 = "null" |