Merge ~paelzer/ubuntu/+source/qemu:lp-1922010-s390x-go-HIRSUTE into ubuntu/+source/qemu:ubuntu/hirsute-devel

Proposed by Christian Ehrhardt 
Status: Merged
Approved by: Christian Ehrhardt 
Approved revision: e2ac4ff5e5709909e9e4d6c468e87566a6f9865f
Merged at revision: e2ac4ff5e5709909e9e4d6c468e87566a6f9865f
Proposed branch: ~paelzer/ubuntu/+source/qemu:lp-1922010-s390x-go-HIRSUTE
Merge into: ubuntu/+source/qemu:ubuntu/hirsute-devel
Diff against target: 78 lines (+56/-0)
3 files modified
debian/changelog (+7/-0)
debian/patches/series (+1/-0)
debian/patches/ubuntu/lp-1922010-linux-user-s390x-Use-the-guest-pointer-for-the-sigre.patch (+48/-0)
Reviewer Review Type Date Requested Status
Paride Legovini (community) Approve
Canonical Server Pending
git-ubuntu developers Pending
Review via email: mp+400680@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :
Revision history for this message
Paride Legovini (paride) wrote :

Clean, formally correct and well split change. I didn't verify the case described in LP: #1922010 (not straightforward), but the version in the PPA appears to work fine in a simple use case and there's nothing calling attention in the build logs.

review: Approve
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

To ssh://git.launchpad.net/~usd-import-team/ubuntu/+source/qemu
 * [new tag] upload/1%5.2+dfsg-9ubuntu2 -> upload/1%5.2+dfsg-9ubuntu2

Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading qemu_5.2+dfsg-9ubuntu2.dsc: done.
  Uploading qemu_5.2+dfsg-9ubuntu2.debian.tar.xz: done.
  Uploading qemu_5.2+dfsg-9ubuntu2_source.buildinfo: done.
  Uploading qemu_5.2+dfsg-9ubuntu2_source.changes: done.
Successfully uploaded packages.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index 78a9423..62871a9 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,10 @@
6+qemu (1:5.2+dfsg-9ubuntu2) hirsute; urgency=medium
7+
8+ * d/p/u/lp-1922010-linux-user-s390x-Use-the-guest-pointer-for-the-sigre.patch:
9+ fix go in qemu-s390x-static (LP: #1922010)
10+
11+ -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Wed, 31 Mar 2021 10:01:40 +0200
12+
13 qemu (1:5.2+dfsg-9ubuntu1) hirsute; urgency=medium
14
15 * Merge with Debian unstable; Remaining changes:
16diff --git a/debian/patches/series b/debian/patches/series
17index b1e31c6..46548ae 100644
18--- a/debian/patches/series
19+++ b/debian/patches/series
20@@ -40,3 +40,4 @@ ubuntu/pre-bionic-256k-ipxe-efi-roms.patch
21 ubuntu/lp-1907789-build-no-pie-is-no-functional-liker-flag.patch
22 ubuntu/lp-1916230-hw-s390x-fix-build-for-virtio-9p-ccw.patch
23 ubuntu/lp-1916705-disas-Fix-build-with-glib2.0-2.67.3.patch
24+ubuntu/lp-1922010-linux-user-s390x-Use-the-guest-pointer-for-the-sigre.patch
25diff --git a/debian/patches/ubuntu/lp-1922010-linux-user-s390x-Use-the-guest-pointer-for-the-sigre.patch b/debian/patches/ubuntu/lp-1922010-linux-user-s390x-Use-the-guest-pointer-for-the-sigre.patch
26new file mode 100644
27index 0000000..078d943
28--- /dev/null
29+++ b/debian/patches/ubuntu/lp-1922010-linux-user-s390x-Use-the-guest-pointer-for-the-sigre.patch
30@@ -0,0 +1,48 @@
31+From 23fff7a17f47420797ac6480147941612152a9ad Mon Sep 17 00:00:00 2001
32+From: Andreas Krebbel <krebbel@linux.ibm.com>
33+Date: Wed, 24 Mar 2021 19:51:28 +0100
34+Subject: [PATCH] linux-user/s390x: Use the guest pointer for the sigreturn
35+ stub
36+
37+When setting up the pointer for the sigreturn stub in the return
38+address register (r14) we currently use the host frame address instead
39+of the guest frame address.
40+
41+Note: This only caused problems if Qemu has been built with
42+--disable-pie (as it is in distros nowadays). Otherwise guest_base
43+defaults to 0 hiding the actual problem.
44+
45+Signed-off-by: Andreas Krebbel <krebbel@linux.ibm.com>
46+Reviewed-by: Laurent Vivier <laurent@vivier.eu>
47+Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
48+Message-Id: <20210324185128.63971-1-krebbel@linux.ibm.com>
49+Signed-off-by: Laurent Vivier <laurent@vivier.eu>
50+
51+Origin: upstream, https://git.qemu.org/?p=qemu.git;a=commit;h=23fff7a17f47420797ac6480147941612152a9ad
52+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1922010
53+Last-Update: 2021-03-31
54+
55+---
56+ linux-user/s390x/signal.c | 5 +++--
57+ 1 file changed, 3 insertions(+), 2 deletions(-)
58+
59+diff --git a/linux-user/s390x/signal.c b/linux-user/s390x/signal.c
60+index ecfa2a14a9..7107c5fb53 100644
61+--- a/linux-user/s390x/signal.c
62++++ b/linux-user/s390x/signal.c
63+@@ -211,9 +211,10 @@ void setup_rt_frame(int sig, struct target_sigaction *ka,
64+ /* Set up to return from userspace. If provided, use a stub
65+ already in userspace. */
66+ if (ka->sa_flags & TARGET_SA_RESTORER) {
67+- env->regs[14] = (unsigned long) ka->sa_restorer | PSW_ADDR_AMODE;
68++ env->regs[14] = ka->sa_restorer | PSW_ADDR_AMODE;
69+ } else {
70+- env->regs[14] = (unsigned long) frame->retcode | PSW_ADDR_AMODE;
71++ env->regs[14] = (frame_addr + offsetof(typeof(*frame), retcode))
72++ | PSW_ADDR_AMODE;
73+ __put_user(S390_SYSCALL_OPCODE | TARGET_NR_rt_sigreturn,
74+ (uint16_t *)(frame->retcode));
75+ }
76+--
77+2.31.1
78+

Subscribers

People subscribed via source and target branches