get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1448254,
    "url": "http://patchwork.ozlabs.org/api/patches/1448254/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-um/patch/20210305214315.75ea78f93d79.I410acf4509c4ff51aac4a03df61d19abfa0454cb@changeid/",
    "project": {
        "id": 60,
        "url": "http://patchwork.ozlabs.org/api/projects/60/?format=api",
        "name": "User-mode Linux Development",
        "link_name": "linux-um",
        "list_id": "linux-um.lists.infradead.org",
        "list_email": "linux-um@lists.infradead.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20210305214315.75ea78f93d79.I410acf4509c4ff51aac4a03df61d19abfa0454cb@changeid>",
    "list_archive_url": null,
    "date": "2021-03-05T20:43:15",
    "name": "um: mark all kernel symbols as local",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "7af8911f56e17631d3d30b5244330d8e8c71776b",
    "submitter": {
        "id": 265,
        "url": "http://patchwork.ozlabs.org/api/people/265/?format=api",
        "name": "Johannes Berg",
        "email": "johannes@sipsolutions.net"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-um/patch/20210305214315.75ea78f93d79.I410acf4509c4ff51aac4a03df61d19abfa0454cb@changeid/mbox/",
    "series": [
        {
            "id": 232451,
            "url": "http://patchwork.ozlabs.org/api/series/232451/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-um/list/?series=232451",
            "date": "2021-03-05T20:43:15",
            "name": "um: mark all kernel symbols as local",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/232451/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1448254/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/1448254/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org",
        "Authentication-Results": [
            "ozlabs.org;\n spf=none (no SPF record) smtp.mailfrom=lists.infradead.org\n (client-ip=2001:8b0:10b:1:d65d:64ff:fe57:4e05; helo=desiato.infradead.org;\n envelope-from=linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n receiver=<UNKNOWN>)",
            "ozlabs.org;\n\tdkim=pass (2048-bit key;\n secure) header.d=lists.infradead.org header.i=@lists.infradead.org\n header.a=rsa-sha256 header.s=desiato.20200630 header.b=crkRomR+;\n\tdkim-atps=neutral"
        ],
        "Received": [
            "from desiato.infradead.org (desiato.infradead.org\n [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest\n SHA256)\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 4Dsfpb05Frz9sVt\n\tfor <incoming@patchwork.ozlabs.org>; Sat,  6 Mar 2021 07:43:51 +1100 (AEDT)",
            "from localhost ([::1] helo=desiato.infradead.org)\n\tby desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux))\n\tid 1lIHIN-00GQba-8j; Fri, 05 Mar 2021 20:43:35 +0000",
            "from s3.sipsolutions.net ([2a01:4f8:191:4433::2]\n helo=sipsolutions.net)\n by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux))\n id 1lIHIC-00GQZG-KH\n for linux-um@lists.infradead.org; Fri, 05 Mar 2021 20:43:27 +0000",
            "by sipsolutions.net with esmtpsa\n (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256)\n (Exim 4.94) (envelope-from <johannes@sipsolutions.net>)\n id 1lIHIA-00CJKq-Ip; Fri, 05 Mar 2021 21:43:22 +0100"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding\n\t:Content-Type:List-Subscribe:List-Help:List-Post:List-Archive:\n\tList-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date:\n\tSubject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date:\n\tResent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner;\n\t bh=OxmrFFBQICOgoOo0BWSn4VGK33ipdf666XOzHg1PWGQ=; b=crkRomR++BCs44rmRQuHfZPYE\n\t7nyt8RpjXMNdwixFA5qTSXmHNjuVjpki4ZmFgnFI6uBGdDV0q7Xte5OFSY7MwRt/US47u3KJ7gTeI\n\totISXYwjH/aqa2OeHd/fz/mhHhbLnOe0mZWewxRkS69KYpSJy57HAO2VDKI1FJJ1jkjPSFNuhbMMx\n\tuKatcQE3uXNDiDBaOr7uUsAjzuJILWcol0+dccxNsWO+26e18TyiVWEo7Xh9n1Tc54TW10F+A3Jdf\n\tNIZjl6aL1RFnbjd3ucUMeYTAV8cveGiTLSHnK0MxjD7H5bPfagHmUQGSzaAfgGwo6i8av1hCFho0A\n\twRM4Hh7kw==;",
        "From": "Johannes Berg <johannes@sipsolutions.net>",
        "To": "linux-um@lists.infradead.org",
        "Cc": "Ritesh Raj Sarraf <rrs@debian.org>,\n Anton Ivanov <anton.ivanov@kot-begemot.co.uk>, 983379@bugs.debian.org,\n Christopher Obbard <chris.obbard@collabora.com>,\n Johannes Berg <johannes.berg@intel.com>",
        "Subject": "[PATCH] um: mark all kernel symbols as local",
        "Date": "Fri,  5 Mar 2021 21:43:15 +0100",
        "Message-Id": "\n <20210305214315.75ea78f93d79.I410acf4509c4ff51aac4a03df61d19abfa0454cb@changeid>",
        "X-Mailer": "git-send-email 2.26.2",
        "In-Reply-To": "<3448a70e7a39b9c3202aeefa7858ace265b8a978.camel@debian.org>",
        "References": "<3448a70e7a39b9c3202aeefa7858ace265b8a978.camel@debian.org>",
        "MIME-Version": "1.0",
        "X-CRM114-Version": "20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ",
        "X-CRM114-CacheID": "sfid-20210305_204325_233178_BECDAF28 ",
        "X-CRM114-Status": "GOOD (  15.40  )",
        "X-Spam-Score": "0.4 (/)",
        "X-Spam-Report": "Spam detection software,\n running on the system \"desiato.infradead.org\",\n has NOT identified this incoming email as spam.  The original\n message has been attached to this so you can view it or label\n similar future email.  If you have any questions, see\n the administrator of that system for details.\n Content preview: From: Johannes Berg <johannes.berg@intel.com> Ritesh\n reported\n a bug [1] against UML, noting that it crashed on startup. The backtrace shows\n the following (heavily redacted): (gdb) bt ... #26 0x0000000060015b5d in\n sem_init () at ipc/sem.c:268 #27 0x00007f89906d92f7 in ?? () from\n /lib/x86_64-linux-gnu/libcom_err.so.2\n #28 0x00007f8990ab8fb2 in call_init (...) at dl-init.c:72 [...]\n Content analysis details:   (0.4 points, 5.0 required)\n pts rule name              description\n ---- ----------------------\n --------------------------------------------------\n 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record\n 0.0 SPF_NONE               SPF: sender does not publish an SPF Record\n 0.4 KHOP_HELO_FCRDNS       Relay HELO differs from its IP's reverse DNS",
        "X-BeenThere": "linux-um@lists.infradead.org",
        "X-Mailman-Version": "2.1.34",
        "Precedence": "list",
        "List-Id": "<linux-um.lists.infradead.org>",
        "List-Unsubscribe": "<http://lists.infradead.org/mailman/options/linux-um>,\n <mailto:linux-um-request@lists.infradead.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.infradead.org/pipermail/linux-um/>",
        "List-Post": "<mailto:linux-um@lists.infradead.org>",
        "List-Help": "<mailto:linux-um-request@lists.infradead.org?subject=help>",
        "List-Subscribe": "<http://lists.infradead.org/mailman/listinfo/linux-um>,\n <mailto:linux-um-request@lists.infradead.org?subject=subscribe>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Sender": "\"linux-um\" <linux-um-bounces@lists.infradead.org>",
        "Errors-To": "linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org"
    },
    "content": "From: Johannes Berg <johannes.berg@intel.com>\n\nRitesh reported a bug [1] against UML, noting that it crashed on\nstartup. The backtrace shows the following (heavily redacted):\n\n(gdb) bt\n...\n #26 0x0000000060015b5d in sem_init () at ipc/sem.c:268\n #27 0x00007f89906d92f7 in ?? () from /lib/x86_64-linux-gnu/libcom_err.so.2\n #28 0x00007f8990ab8fb2 in call_init (...) at dl-init.c:72\n...\n #40 0x00007f89909bf3a6 in nss_load_library (...) at nsswitch.c:359\n...\n #44 0x00007f8990895e35 in _nss_compat_getgrnam_r (...) at nss_compat/compat-grp.c:486\n #45 0x00007f8990968b85 in __getgrnam_r [...]\n #46 0x00007f89909d6b77 in grantpt [...]\n #47 0x00007f8990a9394e in __GI_openpty [...]\n #48 0x00000000604a1f65 in openpty_cb (...) at arch/um/os-Linux/sigio.c:407\n #49 0x00000000604a58d0 in start_idle_thread (...) at arch/um/os-Linux/skas/process.c:598\n #50 0x0000000060004a3d in start_uml () at arch/um/kernel/skas/process.c:45\n #51 0x00000000600047b2 in linux_main (...) at arch/um/kernel/um_arch.c:334\n #52 0x000000006000574f in main (...) at arch/um/os-Linux/main.c:144\n\nindicating that the UML function openpty_cb() calls openpty(),\nwhich internally calls __getgrnam_r(), which causes the nsswitch\nmachinery to get started.\n\nThis loads, through lots of indirection that I snipped, the\nlibcom_err.so.2 library, which (in an unknown function, \"??\")\ncalls sem_init().\n\nNow, of course it wants to get libpthread's sem_init(), since\nit's linked against libpthread. However, the dynamic linker\nlooks up that symbol against the binary first, and gets the\nkernel's sem_init().\n\nHajime Tazaki noted that \"objcopy -L\" can localize a symbol,\nso the dynamic linker wouldn't do the lookup this way. I tried,\nbut for some reason that didn't seem to work.\n\nDoing the same thing in the linker script instead does seem to\nwork, though I cannot entirely explain - it *also* works if I\njust add \"VERSION { { global: *; }; }\" instead, indicating that\nsomething else is happening that I don't really understand. It\nmay be that explicitly doing that marks them with some kind of\nempty version, and that's different from the default.\n\nExplicitly marking them with a version breaks kallsyms, so that\ndoesn't seem to be possible.\n\nMarking all the symbols as local seems correct, and does seem\nto address the issue, so do that. Also do it for static link,\nnsswitch libraries could still be loaded there.\n\n[1] https://bugs.debian.org/983379\n\nReported-by: Ritesh Raj Sarraf <rrs@debian.org>\nSigned-off-by: Johannes Berg <johannes.berg@intel.com>\n---\n arch/um/kernel/dyn.lds.S | 6 ++++++\n arch/um/kernel/uml.lds.S | 6 ++++++\n 2 files changed, 12 insertions(+)",
    "diff": "diff --git a/arch/um/kernel/dyn.lds.S b/arch/um/kernel/dyn.lds.S\nindex dacbfabf66d8..2f2a8ce92f1e 100644\n--- a/arch/um/kernel/dyn.lds.S\n+++ b/arch/um/kernel/dyn.lds.S\n@@ -6,6 +6,12 @@ OUTPUT_ARCH(ELF_ARCH)\n ENTRY(_start)\n jiffies = jiffies_64;\n \n+VERSION {\n+  {\n+    local: *;\n+  };\n+}\n+\n SECTIONS\n {\n   PROVIDE (__executable_start = START);\ndiff --git a/arch/um/kernel/uml.lds.S b/arch/um/kernel/uml.lds.S\nindex 45d957d7004c..7a8e2b123e29 100644\n--- a/arch/um/kernel/uml.lds.S\n+++ b/arch/um/kernel/uml.lds.S\n@@ -7,6 +7,12 @@ OUTPUT_ARCH(ELF_ARCH)\n ENTRY(_start)\n jiffies = jiffies_64;\n \n+VERSION {\n+  {\n+    local: *;\n+  };\n+}\n+\n SECTIONS\n {\n   /* This must contain the right address - not quite the default ELF one.*/\n",
    "prefixes": []
}