get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2219316,
    "url": "http://patchwork.ozlabs.org/api/1.0/patches/2219316/?format=api",
    "project": {
        "id": 2,
        "url": "http://patchwork.ozlabs.org/api/1.0/projects/2/?format=api",
        "name": "Linux PPC development",
        "link_name": "linuxppc-dev",
        "list_id": "linuxppc-dev.lists.ozlabs.org",
        "list_email": "linuxppc-dev@lists.ozlabs.org",
        "web_url": "https://github.com/linuxppc/wiki/wiki",
        "scm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git",
        "webscm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/"
    },
    "msgid": "<20260403004011.44417-3-adubey@linux.ibm.com>",
    "date": "2026-04-03T00:40:08",
    "name": "[v2,2/5] powerpc/bpf: Move out dummy_tramp_addr after Long branch stub",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "4bb78dbc144f4d17f0473b4c1369e7cf56dc2fd5",
    "submitter": {
        "id": 88541,
        "url": "http://patchwork.ozlabs.org/api/1.0/people/88541/?format=api",
        "name": "adubey",
        "email": "adubey@linux.ibm.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20260403004011.44417-3-adubey@linux.ibm.com/mbox/",
    "series": [
        {
            "id": 498551,
            "url": "http://patchwork.ozlabs.org/api/1.0/series/498551/?format=api",
            "date": "2026-04-03T00:40:06",
            "name": "powerpc/bpf: Add support for verifier selftest",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/498551/mbox/"
        }
    ],
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2219316/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "\n <linuxppc-dev+bounces-19234-incoming=patchwork.ozlabs.org@lists.ozlabs.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "linuxppc-dev@lists.ozlabs.org"
        ],
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256\n header.s=pp1 header.b=Idy3yldb;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org\n (client-ip=2404:9400:21b9:f100::1; helo=lists.ozlabs.org;\n envelope-from=linuxppc-dev+bounces-19234-incoming=patchwork.ozlabs.org@lists.ozlabs.org;\n receiver=patchwork.ozlabs.org)",
            "lists.ozlabs.org;\n arc=none smtp.remote-ip=148.163.156.1",
            "lists.ozlabs.org;\n dmarc=pass (p=none dis=none) header.from=linux.ibm.com",
            "lists.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256\n header.s=pp1 header.b=Idy3yldb;\n\tdkim-atps=neutral",
            "lists.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=linux.ibm.com\n (client-ip=148.163.156.1; helo=mx0a-001b2d01.pphosted.com;\n envelope-from=adubey@linux.ibm.com; receiver=lists.ozlabs.org)"
        ],
        "Received": [
            "from lists.ozlabs.org (lists.ozlabs.org\n [IPv6:2404:9400:21b9:f100::1])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fmtzF5Q4bz1yCt\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 03 Apr 2026 07:40:41 +1100 (AEDT)",
            "from boromir.ozlabs.org (localhost [127.0.0.1])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 4fmtzF4Tyjz2yks;\n\tFri, 03 Apr 2026 07:40:41 +1100 (AEDT)",
            "from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com\n [148.163.156.1])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 4fmtzD6M4Hz2yhG\n\tfor <linuxppc-dev@lists.ozlabs.org>; Fri, 03 Apr 2026 07:40:40 +1100 (AEDT)",
            "from pps.filterd (m0360083.ppops.net [127.0.0.1])\n\tby mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id\n 632EdjJc442944;\n\tThu, 2 Apr 2026 20:40:27 GMT",
            "from ppma21.wdc07v.mail.ibm.com\n (5b.69.3da9.ip4.static.sl-reverse.com [169.61.105.91])\n\tby mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4d66g26m1m-1\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);\n\tThu, 02 Apr 2026 20:40:27 +0000 (GMT)",
            "from pps.filterd (ppma21.wdc07v.mail.ibm.com [127.0.0.1])\n\tby ppma21.wdc07v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id\n 632GjZch022291;\n\tThu, 2 Apr 2026 20:40:26 GMT",
            "from smtprelay03.fra02v.mail.ibm.com ([9.218.2.224])\n\tby ppma21.wdc07v.mail.ibm.com (PPS) with ESMTPS id 4d6tanbmbq-1\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);\n\tThu, 02 Apr 2026 20:40:26 +0000",
            "from smtpav03.fra02v.mail.ibm.com (smtpav03.fra02v.mail.ibm.com\n [10.20.54.102])\n\tby smtprelay03.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id\n 632KeMTl59638232\n\t(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);\n\tThu, 2 Apr 2026 20:40:22 GMT",
            "from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id 220BE20043;\n\tThu,  2 Apr 2026 20:40:22 +0000 (GMT)",
            "from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id 1B84B20040;\n\tThu,  2 Apr 2026 20:40:20 +0000 (GMT)",
            "from ltcrain4-lp15.ltc.tadn.ibm.com (unknown [9.5.7.39])\n\tby smtpav03.fra02v.mail.ibm.com (Postfix) with ESMTP;\n\tThu,  2 Apr 2026 20:40:19 +0000 (GMT)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1775162441;\n\tcv=none;\n b=Mx+l9PCiufwZodSvEAFPlTYsbZfDsko7QENQiNDf2jeBej9tQlUCbdWDCyr3lHY0fvAQXmc3jjd1Dfxv2aTXrnLt70N/dPBIkfNO72jYshYVPaTCZvoGBLi0NjJTucUtT7DHPS1lXCXUz45iwc3BKA47drN0sDBInWDOOXiXS/NtPxqFqNQ3qmNNfBeQiQQI+2+8Ts0jPs+Evl5FGXg003N52FE+DfylSLs9ZyzfBakT7sdRA93NTPnQ0ro2DeRh94tPTh2QUK9nOCfH7tZVo8H+ahP3bqI80HSOwo8sFj8XNzKSNtFQQK/4AoautBf+DNJUBXbTbYL4xwL4lAfNjA==",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707;\n\tt=1775162441; c=relaxed/relaxed;\n\tbh=RvBpPQTGVv6dENSoy735WQwLmRTTon1KkOG8SOahmj0=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=eAxpFPQZiWIhFCW/fK+650md28jtyLTRFbqgHxP0CVSm+HhAFIzxC7IY/mDQ1a7y+7RrrrBUuuano+3jvRbHeG0S7+Km3caybGzpNFmw78BDi9duDf2kshAn/sTIIOuomCEMVKJ83MshSxI4GSL4dDoDxn+ofzPBBzgq7Xj4o5a++B8WolO4ki2A74HRJkf+PpsIPbOuPbZMuZu1IleebJJow3ieVeTB+qLiDVJrccqtJ1LP5o2Cb6GKpw82oTmwp5lOQokzzoYDXyDPs/gMPhTsmXHvrp+rvSHOjoX0klzx1reGvEc5VJQaBRS4CWEIBHeRqPx39Vank/oKLkOyEA==",
        "ARC-Authentication-Results": "i=1; lists.ozlabs.org;\n dmarc=pass (p=none dis=none) header.from=linux.ibm.com;\n dkim=pass (2048-bit key;\n unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256\n header.s=pp1 header.b=Idy3yldb; dkim-atps=neutral;\n spf=pass (client-ip=148.163.156.1; helo=mx0a-001b2d01.pphosted.com;\n envelope-from=adubey@linux.ibm.com;\n receiver=lists.ozlabs.org) smtp.mailfrom=linux.ibm.com",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc\n\t:content-transfer-encoding:date:from:in-reply-to:message-id\n\t:mime-version:references:subject:to; s=pp1; bh=RvBpPQTGVv6dENSoy\n\t735WQwLmRTTon1KkOG8SOahmj0=; b=Idy3yldbOXNGE6avuaTRl7hObKvtC6521\n\t5MbhwLU2FtuTbZu2YEEZ6Yj2p6iU0i6Z+tBL8V3OXchJXFkipYzRvaUNLJtONtLJ\n\tXkvJVXVdq9eElOoRXHfe0RE1iGF8rxOy8C83+9ncCR9WqXiiJ5OivmlkCXVnzFjo\n\tlrPkZi8J2ci63zbUDXrmlSmSv4lRW5pq7TCwnrD80ik3SbGByEn1zXOLnctNMBfd\n\tfuqxngWRiz7zMl8zZnBFxy7HPQGZTn2VgAsp9wKFuK2gzhqKIi6ltreLyvLR5OuR\n\tP4RUeV6u9dDawm0TpD8WMtzyj2MPwDnun7JrbjpwFODeHYRd2oVsA==",
        "From": "adubey@linux.ibm.com",
        "To": "linuxppc-dev@lists.ozlabs.org",
        "Cc": "hbathini@linux.ibm.com, bpf@vger.kernel.org, maddy@linux.ibm.com,\n        ast@kernel.org, andrii@kernel.org, daniel@iogearbox.net,\n        shuah@kernel.org, linux-kselftest@vger.kernel.org,\n        stable@vger.kernel.org, Abhishek Dubey <adubey@linux.ibm.com>",
        "Subject": "[PATCH v2 2/5] powerpc/bpf: Move out dummy_tramp_addr after Long\n branch stub",
        "Date": "Thu,  2 Apr 2026 20:40:08 -0400",
        "Message-ID": "<20260403004011.44417-3-adubey@linux.ibm.com>",
        "X-Mailer": "git-send-email 2.52.0",
        "In-Reply-To": "<20260403004011.44417-1-adubey@linux.ibm.com>",
        "References": "<20260403004011.44417-1-adubey@linux.ibm.com>",
        "X-Mailing-List": "linuxppc-dev@lists.ozlabs.org",
        "List-Id": "<linuxppc-dev.lists.ozlabs.org>",
        "List-Help": "<mailto:linuxppc-dev+help@lists.ozlabs.org>",
        "List-Owner": "<mailto:linuxppc-dev+owner@lists.ozlabs.org>",
        "List-Post": "<mailto:linuxppc-dev@lists.ozlabs.org>",
        "List-Archive": "<https://lore.kernel.org/linuxppc-dev/>,\n  <https://lists.ozlabs.org/pipermail/linuxppc-dev/>",
        "List-Subscribe": "<mailto:linuxppc-dev+subscribe@lists.ozlabs.org>,\n  <mailto:linuxppc-dev+subscribe-digest@lists.ozlabs.org>,\n  <mailto:linuxppc-dev+subscribe-nomail@lists.ozlabs.org>",
        "List-Unsubscribe": "<mailto:linuxppc-dev+unsubscribe@lists.ozlabs.org>",
        "Precedence": "list",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-TM-AS-GCONF": "00",
        "X-Authority-Analysis": "v=2.4 cv=Fdo6BZ+6 c=1 sm=1 tr=0 ts=69ced43b cx=c_pps\n a=GFwsV6G8L6GxiO2Y/PsHdQ==:117 a=GFwsV6G8L6GxiO2Y/PsHdQ==:17\n a=A5OVakUREuEA:10 a=VkNPw1HP01LnGYTKEx00:22 a=RnoormkPH1_aCDwRdu11:22\n a=iQ6ETzBq9ecOQQE5vZCe:22 a=VnNF1IyMAAAA:8 a=2TgXZs7zRl4deLkxamQA:9",
        "X-Proofpoint-ORIG-GUID": "5SRogSnlLtghnkEnHb7WE_NyNHuSCe_e",
        "X-Proofpoint-Spam-Details-Enc": "AW1haW4tMjYwNDAyMDE4MSBTYWx0ZWRfX3oJhtaBEHr9K\n +JohFLncZ5w0k2RH3F9dYrzR8p+82ZAVhtg6DKsvsm3tkwfMy+GVykQ95S5OgLzsJe+z+lh+GUr\n N+1BmrnhITZBYTyBwvXzn4DU5+s4TuevDTUa+cmHEWzz63bU5ccv3JNyt4Na32ut6tRXZuuJiOJ\n gWhetz5mbWwhanXojubYhgsjr2+5D1YuS0vkB2qjMFva312Up3y/LIdVjrP7/LREacU2mKUhNju\n 1AvBFUprn0xCrpPyYSeAzGe/1qyx4Fd5LLf5ErhQfhDRKl+xpsgG3RPHKbImpj42JhcNMpomVN5\n fv/V6JjkVkzjkAieWm73HToQzW26NzXnQIGAqCtvOVUFs3W2Ez0GOnJ2kGo5KEY47lnH5moTaXI\n FxNdCydQ80UAagaQyU35hscTlW7v4qu66n9Cf33XH2n5N7KqAj1fuPkZuE1x96LJI2+XOwX05HB\n jRKWjOJ2Av7BtjNKXcg==",
        "X-Proofpoint-GUID": "5SRogSnlLtghnkEnHb7WE_NyNHuSCe_e",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49\n definitions=2026-04-02_03,2026-04-02_05,2025-10-01_01",
        "X-Proofpoint-Spam-Details": "rule=outbound_notspam policy=outbound score=0\n impostorscore=0 clxscore=1015 bulkscore=0 suspectscore=0 priorityscore=1501\n adultscore=0 malwarescore=0 phishscore=0 spamscore=0 lowpriorityscore=0\n classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0\n reason=mlx scancount=1 engine=8.22.0-2603050001 definitions=main-2604020181",
        "X-Spam-Status": "No, score=1.7 required=3.0 tests=DATE_IN_FUTURE_03_06,\n\tDKIM_SIGNED,DKIM_VALID,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H4,\n\tRCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS autolearn=disabled\n\tversion=4.0.1 OzLabs 8",
        "X-Spam-Level": "*",
        "X-Spam-Checker-Version": "SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org"
    },
    "content": "From: Abhishek Dubey <adubey@linux.ibm.com>\n\nMove the long branch address space to the bottom of the long\nbranch stub. This allows uninterrupted disassembly until the\nlast 8 bytes. Exclude these last bytes from the overall\nprogram length to prevent failure in assembly generation.\nAlso, align dummy_tramp_addr field with 8-byte boundary.\n\nFollowing is disassembler output for test program with moved down\ndummy_tramp_addr field:\n.....\n.....\npc:68    left:44     a6 03 08 7c  :  mtlr 0\npc:72    left:40     bc ff ff 4b  :  b .-68\npc:76    left:36     a6 02 68 7d  :  mflr 11\npc:80    left:32     05 00 9f 42  :  bcl 20, 31, .+4\npc:84    left:28     a6 02 88 7d  :  mflr 12\npc:88    left:24     14 00 8c e9  :  ld 12, 20(12)\npc:92    left:20     a6 03 89 7d  :  mtctr 12\npc:96    left:16     a6 03 68 7d  :  mtlr 11\npc:100   left:12     20 04 80 4e  :  bctr\npc:104   left:8      c0 34 1d 00  :\n\nFailure log:\nCan't disasm instruction at offset 104: c0 34 1d 00 00 00 00 c0\nDisassembly logic can truncate at 104, ignoring last 8 bytes.\n\nUpdate the dummy_tramp_addr field offset calculation from the end\nof the program to reflect its new location, for bpf_arch_text_poke()\nto update the actual trampoline's address in this field.\n\nAll BPF trampoline selftests continue to pass with this patch applied.\n\nSigned-off-by: Abhishek Dubey <adubey@linux.ibm.com>\n---\n arch/powerpc/net/bpf_jit_comp.c | 35 ++++++++++++++++++++++-----------\n 1 file changed, 24 insertions(+), 11 deletions(-)",
    "diff": "diff --git a/arch/powerpc/net/bpf_jit_comp.c b/arch/powerpc/net/bpf_jit_comp.c\nindex 3cbb3647f7a0..00abad48fa6c 100644\n--- a/arch/powerpc/net/bpf_jit_comp.c\n+++ b/arch/powerpc/net/bpf_jit_comp.c\n@@ -93,27 +93,36 @@ void bpf_jit_build_fentry_stubs(u32 *image, u32 *fimage, struct codegen_context\n \n \t/*\n \t * Long branch stub:\n-\t *\t.long\t<dummy_tramp_addr>  // 8-byte aligned\n \t *\tmflr\tr11\n \t *\tbcl\t20,31,$+4\n-\t *\tmflr\tr12\n-\t *\tld\tr12, -8-SZL(r12)\n+\t *\tmflr\tr12\t// lr/r12 stores current pc\n+\t *\tld\tr12, 20(r12) // offset(dummy_tramp_addr) from prev inst. is 20\n \t *\tmtctr\tr12\n-\t *\tmtlr\tr11 // needed to retain ftrace ABI\n+\t *\tmtlr\tr11\t// needed to retain ftrace ABI\n \t *\tbctr\n+\t *\tnop\t\t// for alignment of following address field\n+\t *\t.long\t<dummy_tramp_addr>  // 8-byte aligned\n \t */\n-\tif (image)\n-\t\t*((unsigned long *)&image[ctx->idx]) = (unsigned long)dummy_tramp;\n-\n-\tctx->idx += SZL / 4;\n \tlong_branch_stub_idx = ctx->idx;\n \tEMIT(PPC_RAW_MFLR(_R11));\n \tEMIT(PPC_RAW_BCL4());\n \tEMIT(PPC_RAW_MFLR(_R12));\n-\tEMIT(PPC_RAW_LL(_R12, _R12, -8-SZL));\n+\tEMIT(PPC_RAW_LL(_R12, _R12, 20));\n \tEMIT(PPC_RAW_MTCTR(_R12));\n \tEMIT(PPC_RAW_MTLR(_R11));\n \tEMIT(PPC_RAW_BCTR());\n+\t/*\n+\t * The start of Long branch stub is guaranteed to be aligned as\n+\t * result of optional NOP injection before OOL stub above.\n+\t * Append tail NOP to re-gain 8-byte alignment disturbed by odd\n+\t * instruction count in Long branch stub.\n+\t */\n+\tEMIT(PPC_RAW_NOP());\n+\n+\tif (image)\n+\t\t*((unsigned long *)&image[ctx->idx]) = (unsigned long)dummy_tramp;\n+\n+\tctx->idx += SZL / 4;\n \n \tif (!bpf_jit_ool_stub) {\n \t\tbpf_jit_ool_stub = (ctx->idx - ool_stub_idx) * 4;\n@@ -1309,6 +1318,7 @@ static void do_isync(void *info __maybe_unused)\n  * bpf_func:\n  *\t[nop|b]\tool_stub\n  * 2. Out-of-line stub:\n+ *\tnop\t// optional nop for alignment\n  * ool_stub:\n  *\tmflr\tr0\n  *\t[b|bl]\t<bpf_prog>/<long_branch_stub>\n@@ -1316,7 +1326,6 @@ static void do_isync(void *info __maybe_unused)\n  *\tb\tbpf_func + 4\n  * 3. Long branch stub:\n  * long_branch_stub:\n- *\t.long\t<branch_addr>/<dummy_tramp>\n  *\tmflr\tr11\n  *\tbcl\t20,31,$+4\n  *\tmflr\tr12\n@@ -1324,6 +1333,8 @@ static void do_isync(void *info __maybe_unused)\n  *\tmtctr\tr12\n  *\tmtlr\tr11 // needed to retain ftrace ABI\n  *\tbctr\n+ *\tnop\t// nop for mem alignment of dummy_tramp_addr\n+ *\t.long\t<branch_addr>/<dummy_tramp>\n  *\n  * dummy_tramp is used to reduce synchronization requirements.\n  *\n@@ -1425,10 +1436,12 @@ int bpf_arch_text_poke(void *ip, enum bpf_text_poke_type old_t,\n \t * 1. Update the address in the long branch stub:\n \t * If new_addr is out of range, we will have to use the long branch stub, so patch new_addr\n \t * here. Otherwise, revert to dummy_tramp, but only if we had patched old_addr here.\n+\t *\n+\t * dummy_tramp_addr moved to bottom of long branch stub.\n \t */\n \tif ((new_addr && !is_offset_in_branch_range(new_addr - ip)) ||\n \t    (old_addr && !is_offset_in_branch_range(old_addr - ip)))\n-\t\tret = patch_ulong((void *)(bpf_func_end - bpf_jit_long_branch_stub - SZL),\n+\t\tret = patch_ulong((void *)(bpf_func_end - SZL), /* SZL: dummy_tramp_addr offset */\n \t\t\t\t  (new_addr && !is_offset_in_branch_range(new_addr - ip)) ?\n \t\t\t\t  (unsigned long)new_addr : (unsigned long)dummy_tramp);\n \tif (ret)\n",
    "prefixes": [
        "v2",
        "2/5"
    ]
}