get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 818714,
    "url": "http://patchwork.ozlabs.org/api/patches/818714/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/b0a84ccf-8842-876c-ec82-b4b1da3d6efa@solarflare.com/",
    "project": {
        "id": 7,
        "url": "http://patchwork.ozlabs.org/api/projects/7/?format=api",
        "name": "Linux network development",
        "link_name": "netdev",
        "list_id": "netdev.vger.kernel.org",
        "list_email": "netdev@vger.kernel.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<b0a84ccf-8842-876c-ec82-b4b1da3d6efa@solarflare.com>",
    "list_archive_url": null,
    "date": "2017-09-26T15:35:13",
    "name": "[v2,net-next,1/2] bpf/verifier: improve disassembly of BPF_END instructions",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "1bef58f33ac5a9b745f217349042a13df93ab7c7",
    "submitter": {
        "id": 61177,
        "url": "http://patchwork.ozlabs.org/api/people/61177/?format=api",
        "name": "Edward Cree",
        "email": "ecree@solarflare.com"
    },
    "delegate": {
        "id": 34,
        "url": "http://patchwork.ozlabs.org/api/users/34/?format=api",
        "username": "davem",
        "first_name": "David",
        "last_name": "Miller",
        "email": "davem@davemloft.net"
    },
    "mbox": "http://patchwork.ozlabs.org/project/netdev/patch/b0a84ccf-8842-876c-ec82-b4b1da3d6efa@solarflare.com/mbox/",
    "series": [
        {
            "id": 5167,
            "url": "http://patchwork.ozlabs.org/api/series/5167/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=5167",
            "date": "2017-09-26T15:32:15",
            "name": "bpf/verifier: disassembly improvements",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/5167/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/818714/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/818714/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<netdev-owner@vger.kernel.org>",
        "X-Original-To": "patchwork-incoming@ozlabs.org",
        "Delivered-To": "patchwork-incoming@ozlabs.org",
        "Authentication-Results": "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)",
        "Received": [
            "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y1lQT4qDSz9t3R\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed, 27 Sep 2017 01:35:29 +1000 (AEST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1031420AbdIZPf1 (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tTue, 26 Sep 2017 11:35:27 -0400",
            "from dispatch1-us1.ppe-hosted.com ([67.231.154.164]:33410 \"EHLO\n\tdispatch1-us1.ppe-hosted.com\" rhost-flags-OK-OK-OK-OK)\n\tby vger.kernel.org with ESMTP id S1031415AbdIZPf0 (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Tue, 26 Sep 2017 11:35:26 -0400",
            "from pure.maildistiller.com (unknown [10.110.50.29])\n\tby dispatch1-us1.ppe-hosted.com (Proofpoint Essentials ESMTP Server)\n\twith ESMTP id 8268120070; Tue, 26 Sep 2017 15:35:26 +0000 (UTC)",
            "from mx1-us4.ppe-hosted.com (unknown [10.110.49.251])\n\tby pure.maildistiller.com (Proofpoint Essentials ESMTP Server) with\n\tESMTPS id 58DDC40054; Tue, 26 Sep 2017 15:35:23 +0000 (UTC)",
            "from webmail.solarflare.com (uk.solarflare.com [193.34.186.16])\n\t(using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1-us4.ppe-hosted.com (Proofpoint Essentials ESMTP Server) with\n\tESMTPS id D7B318005E; Tue, 26 Sep 2017 15:35:22 +0000 (UTC)",
            "from ec-desktop.uk.solarflarecom.com (10.17.20.45) by\n\tukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server\n\t(TLS) id 15.0.1044.25; Tue, 26 Sep 2017 16:35:17 +0100"
        ],
        "X-Virus-Scanned": "Proofpoint Essentials engine",
        "From": "Edward Cree <ecree@solarflare.com>",
        "Subject": "[PATCH v2 net-next 1/2] bpf/verifier: improve disassembly of BPF_END\n\tinstructions",
        "To": "<davem@davemloft.net>",
        "References": "<52270348-67f1-4e7a-cd2f-9d611ae94064@solarflare.com>",
        "CC": "<netdev@vger.kernel.org>, <daniel@iogearbox.net>,\n\t<alexei.starovoitov@gmail.com>, <ys114321@gmail.com>",
        "Message-ID": "<b0a84ccf-8842-876c-ec82-b4b1da3d6efa@solarflare.com>",
        "Date": "Tue, 26 Sep 2017 16:35:13 +0100",
        "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101\n\tThunderbird/45.1.0",
        "MIME-Version": "1.0",
        "In-Reply-To": "<52270348-67f1-4e7a-cd2f-9d611ae94064@solarflare.com>",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "7bit",
        "X-Originating-IP": "[10.17.20.45]",
        "X-ClientProxiedBy": "ocex03.SolarFlarecom.com (10.20.40.36) To\n\tukex01.SolarFlarecom.com (10.17.10.4)",
        "X-TM-AS-Product-Ver": "SMEX-11.0.0.1191-8.100.1062-23352.000",
        "X-TM-AS-Result": "No--5.134700-0.000000-31",
        "X-TM-AS-User-Approved-Sender": "Yes",
        "X-TM-AS-User-Blocked-Sender": "No",
        "X-MDID": "1506440126-DhywHdgRivQT",
        "Sender": "netdev-owner@vger.kernel.org",
        "Precedence": "bulk",
        "List-ID": "<netdev.vger.kernel.org>",
        "X-Mailing-List": "netdev@vger.kernel.org"
    },
    "content": "print_bpf_insn() was treating all BPF_ALU[64] the same, but BPF_END has a\n different structure: it has a size in insn->imm (even if it's BPF_X) and\n uses the BPF_SRC (X or K) to indicate which endianness to use.  So it\n needs different code to print it.\n\nSigned-off-by: Edward Cree <ecree@solarflare.com>\n---\n kernel/bpf/verifier.c | 18 ++++++++++++++++--\n 1 file changed, 16 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c\nindex 799b245..3aaa3262 100644\n--- a/kernel/bpf/verifier.c\n+++ b/kernel/bpf/verifier.c\n@@ -325,26 +325,40 @@ static const char *const bpf_jmp_string[16] = {\n \t[BPF_EXIT >> 4] = \"exit\",\n };\n \n+static void print_bpf_end_insn(const struct bpf_verifier_env *env,\n+\t\t\t       const struct bpf_insn *insn)\n+{\n+\tverbose(\"(%02x) r%d = %s%d r%d\\n\", insn->code, insn->dst_reg,\n+\t\tBPF_SRC(insn->code) == BPF_TO_BE ? \"be\" : \"le\",\n+\t\tinsn->imm, insn->dst_reg);\n+}\n+\n static void print_bpf_insn(const struct bpf_verifier_env *env,\n \t\t\t   const struct bpf_insn *insn)\n {\n \tu8 class = BPF_CLASS(insn->code);\n \n \tif (class == BPF_ALU || class == BPF_ALU64) {\n-\t\tif (BPF_SRC(insn->code) == BPF_X)\n+\t\tif (BPF_OP(insn->code) == BPF_END) {\n+\t\t\tif (class == BPF_ALU64)\n+\t\t\t\tverbose(\"BUG_alu64_%02x\\n\", insn->code);\n+\t\t\telse\n+\t\t\t\tprint_bpf_end_insn(env, insn);\n+\t\t} else if (BPF_SRC(insn->code) == BPF_X) {\n \t\t\tverbose(\"(%02x) %sr%d %s %sr%d\\n\",\n \t\t\t\tinsn->code, class == BPF_ALU ? \"(u32) \" : \"\",\n \t\t\t\tinsn->dst_reg,\n \t\t\t\tbpf_alu_string[BPF_OP(insn->code) >> 4],\n \t\t\t\tclass == BPF_ALU ? \"(u32) \" : \"\",\n \t\t\t\tinsn->src_reg);\n-\t\telse\n+\t\t} else {\n \t\t\tverbose(\"(%02x) %sr%d %s %s%d\\n\",\n \t\t\t\tinsn->code, class == BPF_ALU ? \"(u32) \" : \"\",\n \t\t\t\tinsn->dst_reg,\n \t\t\t\tbpf_alu_string[BPF_OP(insn->code) >> 4],\n \t\t\t\tclass == BPF_ALU ? \"(u32) \" : \"\",\n \t\t\t\tinsn->imm);\n+\t\t}\n \t} else if (class == BPF_STX) {\n \t\tif (BPF_MODE(insn->code) == BPF_MEM)\n \t\t\tverbose(\"(%02x) *(%s *)(r%d %+d) = r%d\\n\",\n",
    "prefixes": [
        "v2",
        "net-next",
        "1/2"
    ]
}