get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/1.1/patches/2228169/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2228169,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2228169/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260425155140.50186-3-deller@kernel.org/",
    "project": {
        "id": 14,
        "url": "http://patchwork.ozlabs.org/api/1.1/projects/14/?format=api",
        "name": "QEMU Development",
        "link_name": "qemu-devel",
        "list_id": "qemu-devel.nongnu.org",
        "list_email": "qemu-devel@nongnu.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<20260425155140.50186-3-deller@kernel.org>",
    "date": "2026-04-25T15:51:28",
    "name": "[PULL,02/14] linux-user/ppc: Fix ppc64 rt_sigframe stack offset",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "2d21272ea9d5c0b0abab7e9167fc412e43da566c",
    "submitter": {
        "id": 87076,
        "url": "http://patchwork.ozlabs.org/api/1.1/people/87076/?format=api",
        "name": "Helge Deller",
        "email": "deller@kernel.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260425155140.50186-3-deller@kernel.org/mbox/",
    "series": [
        {
            "id": 501448,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/501448/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=501448",
            "date": "2026-04-25T15:51:29",
            "name": "[PULL,01/14] MAINTAINERS: Add myself as maintainer for linux-user",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/501448/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2228169/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2228169/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=ivy2zczB;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists1p.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)"
        ],
        "Received": [
            "from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g2vV40LDJz1yJ2\n\tfor <incoming@patchwork.ozlabs.org>; Sun, 26 Apr 2026 01:52:27 +1000 (AEST)",
            "from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists1p.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1wGfIi-00083p-8K; Sat, 25 Apr 2026 11:52:12 -0400",
            "from eggs.gnu.org ([2001:470:142:3::10])\n by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <deller@kernel.org>) id 1wGfIU-00080V-2Q\n for qemu-devel@nongnu.org; Sat, 25 Apr 2026 11:51:58 -0400",
            "from tor.source.kernel.org ([172.105.4.254])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <deller@kernel.org>) id 1wGfIS-000127-E9\n for qemu-devel@nongnu.org; Sat, 25 Apr 2026 11:51:57 -0400",
            "from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58])\n by tor.source.kernel.org (Postfix) with ESMTP id 2F731600CB;\n Sat, 25 Apr 2026 15:51:48 +0000 (UTC)",
            "by smtp.kernel.org (Postfix) with ESMTPSA id 773DEC2BCB6;\n Sat, 25 Apr 2026 15:51:46 +0000 (UTC)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n s=k20201202; t=1777132307;\n bh=N0SltF6kWrhKYQvGQd+k67AMBYWPlgGMkWYMzuPa5JM=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n b=ivy2zczBHzMWbM+4FCuEJC/Ca78ks/MI9FIjvCRZPCXuPo3leVywMOb1mj1FYRDGF\n /Ak3b07ncGbpFC0BYAr+K78MFFwcHMVEU2v/byy6pdRvmpuZT7N0WpeMMsqi4M3pOa\n MiMPoPgVooMC2aSADUrfOUOgXg4w5fc1VB2Eby5XXW99Yw8bmYEVZdpEvFyj+uRKXM\n 4/HrGjZHZFvJ9pgvY5ZsBe1UmpxARTPOro8gJTk0h+DNZHMAV0urLXTag/5iLo1fMz\n ZoS3twJUL3JC/jP5SY79/hzOMllEM/tgsj8Xv/rIUyEJysLftw7EUVwMXDSNuENoHJ\n QFcMEq0sonNbQ==",
        "From": "Helge Deller <deller@kernel.org>",
        "To": "qemu-devel@nongnu.org",
        "Cc": "Helge Deller <deller@gmx.de>, Jiaxun Yang <jiaxun.yang@flygoat.com>,\n Laurent Vivier <laurent@vivier.eu>,\n Pierrick Bouvier <pierrick.bouvier@linaro.org>, =?utf-8?q?Philippe_Mathieu-?=\n\t=?utf-8?q?Daud=C3=A9?= <philmd@linaro.org>",
        "Subject": "[PULL 02/14] linux-user/ppc: Fix ppc64 rt_sigframe stack offset",
        "Date": "Sat, 25 Apr 2026 17:51:28 +0200",
        "Message-ID": "<20260425155140.50186-3-deller@kernel.org>",
        "X-Mailer": "git-send-email 2.53.0",
        "In-Reply-To": "<20260425155140.50186-1-deller@kernel.org>",
        "References": "<20260425155140.50186-1-deller@kernel.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Received-SPF": "pass client-ip=172.105.4.254; envelope-from=deller@kernel.org;\n helo=tor.source.kernel.org",
        "X-Spam_score_int": "-20",
        "X-Spam_score": "-2.1",
        "X-Spam_bar": "--",
        "X-Spam_report": "(-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001,\n DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no",
        "X-Spam_action": "no action",
        "X-BeenThere": "qemu-devel@nongnu.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "qemu development <qemu-devel.nongnu.org>",
        "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>",
        "List-Archive": "<https://lists.nongnu.org/archive/html/qemu-devel>",
        "List-Post": "<mailto:qemu-devel@nongnu.org>",
        "List-Help": "<mailto:qemu-devel-request@nongnu.org?subject=help>",
        "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>",
        "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org",
        "Sender": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org"
    },
    "content": "From: Matt Turner <mattst88@gmail.com>\n\nThe kernel's 64-bit signal delivery (signal_64.c) uses:\n\n    newsp = frame - __SIGNAL_FRAMESIZE\n\nwhile the 32-bit path (signal_32.c) uses:\n\n    newsp = frame - (__SIGNAL_FRAMESIZE + 16)\n\nThe extra 16 bytes in the 32-bit case is to place siginfo and ucontext\nat the same offsets as older kernels (see the comment in signal_32.c).\nThe 64-bit rt_sigframe starts with ucontext directly and does not need\nthis adjustment.\n\nQEMU's setup_rt_frame() unconditionally used (SIGNAL_FRAMESIZE + 16)\nfor both 32-bit and 64-bit, placing the handler's SP 16 bytes too low\non ppc64. Signal delivery and return still worked because do_rt_sigreturn\nhad the matching wrong offset, but the vDSO DWARF unwind info encodes\nthe correct kernel offset. This caused any DWARF unwinder (libunwind,\nlibgcc, etc.) to compute a CFA that is 16 bytes off, reading garbage\nregister values from the signal frame.\n\nDefine RT_SIGFRAME_ADJUST (0 on ppc64, 16 on ppc32) and use it in both\nsetup_rt_frame and do_rt_sigreturn to match the kernel.\n\nThis was verified by A/B testing with libunwind's test suite:\n\n  ppc64le: Gtest-bt, Ltest-bt, Gtest-concurrent, Ltest-concurrent,\n           and Ltest-sig-context all change from FAIL to PASS.\n  ppc64be: Gtest-bt, Ltest-bt, and Ltest-sig-context all change\n           from FAIL to PASS.\n\nSigned-off-by: Matt Turner <mattst88@gmail.com>\nReviewed-by: Peter Maydell <peter.maydell@linaro.org>\nSigned-off-by: Helge Deller <deller@gmx.de>\nCc: qemu-stable@nongnu.org\n---\n linux-user/ppc/signal.c | 16 ++++++++++++++--\n 1 file changed, 14 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/linux-user/ppc/signal.c b/linux-user/ppc/signal.c\nindex 24e5a02a78..a9c10e0987 100644\n--- a/linux-user/ppc/signal.c\n+++ b/linux-user/ppc/signal.c\n@@ -210,6 +210,18 @@ QEMU_BUILD_BUG_ON(offsetof(struct target_rt_sigframe, uc.tuc_mcontext)\n \n #endif\n \n+#ifdef TARGET_PPC64\n+#define RT_SIGFRAME_ADJUST 0\n+#else\n+/*\n+ * For 32-bit rt sigframes we have an extra 16 bytes of gap\n+ * on top of __SIGNAL_FRAMESIZE; this is to get the siginfo\n+ * and ucontext in the same positions as in older kernels.\n+ * See Linux's arch/powerpc/kernel/signal_32.c.\n+ */\n+#define RT_SIGFRAME_ADJUST 16\n+#endif\n+\n #if defined(TARGET_PPC64)\n \n struct target_func_ptr {\n@@ -525,7 +537,7 @@ void setup_rt_frame(int sig, struct target_sigaction *ka,\n     env->fpscr = 0;\n \n     /* Create a stack frame for the caller of the handler.  */\n-    newsp = rt_sf_addr - (SIGNAL_FRAMESIZE + 16);\n+    newsp = rt_sf_addr - (SIGNAL_FRAMESIZE + RT_SIGFRAME_ADJUST);\n     err |= put_user(env->gpr[1], newsp, target_ulong);\n \n     if (err)\n@@ -641,7 +653,7 @@ long do_rt_sigreturn(CPUPPCState *env)\n     struct target_rt_sigframe *rt_sf = NULL;\n     target_ulong rt_sf_addr;\n \n-    rt_sf_addr = env->gpr[1] + SIGNAL_FRAMESIZE + 16;\n+    rt_sf_addr = env->gpr[1] + SIGNAL_FRAMESIZE + RT_SIGFRAME_ADJUST;\n     if (!lock_user_struct(VERIFY_READ, rt_sf, rt_sf_addr, 1))\n         goto sigsegv;\n \n",
    "prefixes": [
        "PULL",
        "02/14"
    ]
}