get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1238809,
    "url": "http://patchwork.ozlabs.org/api/patches/1238809/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/20200216193005.144157-6-jolsa@kernel.org/",
    "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": "<20200216193005.144157-6-jolsa@kernel.org>",
    "list_archive_url": null,
    "date": "2020-02-16T19:29:52",
    "name": "[05/18] bpf: Add lnode list node to struct bpf_ksym",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": false,
    "hash": "638aaa8630cdd61285a453587abd87d327f84bd5",
    "submitter": {
        "id": 73687,
        "url": "http://patchwork.ozlabs.org/api/people/73687/?format=api",
        "name": "Jiri Olsa",
        "email": "jolsa@kernel.org"
    },
    "delegate": {
        "id": 77147,
        "url": "http://patchwork.ozlabs.org/api/users/77147/?format=api",
        "username": "bpf",
        "first_name": "BPF",
        "last_name": "Maintainers",
        "email": "bpf@iogearbox.net"
    },
    "mbox": "http://patchwork.ozlabs.org/project/netdev/patch/20200216193005.144157-6-jolsa@kernel.org/mbox/",
    "series": [
        {
            "id": 158829,
            "url": "http://patchwork.ozlabs.org/api/series/158829/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=158829",
            "date": "2020-02-16T19:29:47",
            "name": "bpf: Add trampoline and dispatcher to /proc/kallsyms",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/158829/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1238809/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/1238809/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<bpf-owner@vger.kernel.org>",
        "X-Original-To": "incoming-bpf@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming-bpf@bilbo.ozlabs.org",
        "Authentication-Results": [
            "ozlabs.org; spf=none (no SPF record)\n\tsmtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67;\n\thelo=vger.kernel.org; envelope-from=bpf-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org;\n\tdmarc=fail (p=none dis=none) header.from=kernel.org"
        ],
        "Received": [
            "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 48LHK161xXz9sPK\n\tfor <incoming-bpf@patchwork.ozlabs.org>;\n\tMon, 17 Feb 2020 06:30:45 +1100 (AEDT)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1727761AbgBPTap convert rfc822-to-8bit (ORCPT\n\t<rfc822;incoming-bpf@patchwork.ozlabs.org>);\n\tSun, 16 Feb 2020 14:30:45 -0500",
            "from us-smtp-1.mimecast.com ([205.139.110.61]:52451 \"EHLO\n\tus-smtp-1.mimecast.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1727755AbgBPTap (ORCPT <rfc822; bpf@vger.kernel.org>); \n\tSun, 16 Feb 2020 14:30:45 -0500",
            "from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com\n\t[209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id\n\tus-mta-14-gX3TjCg2NDC0OnyictXVkg-1; Sun, 16 Feb 2020 14:30:40 -0500",
            "from smtp.corp.redhat.com\n\t(int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mimecast-mx01.redhat.com (Postfix) with ESMTPS id 91A8D100551A;\n\tSun, 16 Feb 2020 19:30:38 +0000 (UTC)",
            "from krava.redhat.com (ovpn-204-28.brq.redhat.com [10.40.204.28])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 81CF28574E;\n\tSun, 16 Feb 2020 19:30:35 +0000 (UTC)"
        ],
        "From": "Jiri Olsa <jolsa@kernel.org>",
        "To": "Alexei Starovoitov <ast@kernel.org>,\n\tDaniel Borkmann <daniel@iogearbox.net>",
        "Cc": "netdev@vger.kernel.org, bpf@vger.kernel.org, Andrii Nakryiko\n\t<andriin@fb.com>, Yonghong Song <yhs@fb.com>, Song Liu\n\t<songliubraving@fb.com>,         Martin KaFai Lau <kafai@fb.com>,\n\tJakub Kicinski <kuba@kernel.org>, David Miller <davem@redhat.com>,\n\t=?utf-8?b?QmrDtnJuIFTDtnBlbA==?= <bjorn.topel@intel.com>,\n\tJohn Fastabend <john.fastabend@gmail.com>, Jesper Dangaard Brouer\n\t<hawk@kernel.org>,         Arnaldo Carvalho de Melo <acme@redhat.com>",
        "Subject": "[PATCH 05/18] bpf: Add lnode list node to struct bpf_ksym",
        "Date": "Sun, 16 Feb 2020 20:29:52 +0100",
        "Message-Id": "<20200216193005.144157-6-jolsa@kernel.org>",
        "In-Reply-To": "<20200216193005.144157-1-jolsa@kernel.org>",
        "References": "<20200216193005.144157-1-jolsa@kernel.org>",
        "MIME-Version": "1.0",
        "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.11",
        "X-MC-Unique": "gX3TjCg2NDC0OnyictXVkg-1",
        "X-Mimecast-Spam-Score": "0",
        "X-Mimecast-Originator": "kernel.org",
        "Content-Type": "text/plain; charset=WINDOWS-1252",
        "Content-Transfer-Encoding": "8BIT",
        "Sender": "bpf-owner@vger.kernel.org",
        "Precedence": "bulk",
        "List-ID": "<bpf.vger.kernel.org>",
        "X-Mailing-List": "bpf@vger.kernel.org"
    },
    "content": "Adding lnode list node to 'struct bpf_ksym' object,\nso the symbol itself can be chained and used in other\nobjects like bpf_trampoline and bpf_dispatcher.\n\nChanging iterator to bpf_ksym in bpf_get_kallsym.\n\nSigned-off-by: Jiri Olsa <jolsa@kernel.org>\n---\n include/linux/bpf.h |  2 +-\n kernel/bpf/core.c   | 22 +++++++++++-----------\n 2 files changed, 12 insertions(+), 12 deletions(-)",
    "diff": "diff --git a/include/linux/bpf.h b/include/linux/bpf.h\nindex e7b2e9fc256c..f1174d24c185 100644\n--- a/include/linux/bpf.h\n+++ b/include/linux/bpf.h\n@@ -467,6 +467,7 @@ struct bpf_ksym {\n \tunsigned long\t\t start;\n \tunsigned long\t\t end;\n \tchar\t\t\t name[KSYM_NAME_LEN];\n+\tstruct list_head\t lnode;\n };\n \n enum bpf_tramp_prog_type {\n@@ -649,7 +650,6 @@ struct bpf_prog_aux {\n \tstruct bpf_jit_poke_descriptor *poke_tab;\n \tu32 size_poke_tab;\n \tstruct latch_tree_node ksym_tnode;\n-\tstruct list_head ksym_lnode;\n \tstruct bpf_ksym ksym;\n \tconst struct bpf_prog_ops *ops;\n \tstruct bpf_map **used_maps;\ndiff --git a/kernel/bpf/core.c b/kernel/bpf/core.c\nindex a7aaa81035b1..604093d2153a 100644\n--- a/kernel/bpf/core.c\n+++ b/kernel/bpf/core.c\n@@ -97,7 +97,7 @@ struct bpf_prog *bpf_prog_alloc_no_stats(unsigned int size, gfp_t gfp_extra_flag\n \tfp->aux->prog = fp;\n \tfp->jit_requested = ebpf_jit_enabled();\n \n-\tINIT_LIST_HEAD_RCU(&fp->aux->ksym_lnode);\n+\tINIT_LIST_HEAD_RCU(&fp->aux->ksym.lnode);\n \n \treturn fp;\n }\n@@ -612,18 +612,18 @@ static struct latch_tree_root bpf_tree __cacheline_aligned;\n \n static void bpf_prog_ksym_node_add(struct bpf_prog_aux *aux)\n {\n-\tWARN_ON_ONCE(!list_empty(&aux->ksym_lnode));\n-\tlist_add_tail_rcu(&aux->ksym_lnode, &bpf_kallsyms);\n+\tWARN_ON_ONCE(!list_empty(&aux->ksym.lnode));\n+\tlist_add_tail_rcu(&aux->ksym.lnode, &bpf_kallsyms);\n \tlatch_tree_insert(&aux->ksym_tnode, &bpf_tree, &bpf_tree_ops);\n }\n \n static void bpf_prog_ksym_node_del(struct bpf_prog_aux *aux)\n {\n-\tif (list_empty(&aux->ksym_lnode))\n+\tif (list_empty(&aux->ksym.lnode))\n \t\treturn;\n \n \tlatch_tree_erase(&aux->ksym_tnode, &bpf_tree, &bpf_tree_ops);\n-\tlist_del_rcu(&aux->ksym_lnode);\n+\tlist_del_rcu(&aux->ksym.lnode);\n }\n \n static bool bpf_prog_kallsyms_candidate(const struct bpf_prog *fp)\n@@ -633,8 +633,8 @@ static bool bpf_prog_kallsyms_candidate(const struct bpf_prog *fp)\n \n static bool bpf_prog_kallsyms_verify_off(const struct bpf_prog *fp)\n {\n-\treturn list_empty(&fp->aux->ksym_lnode) ||\n-\t       fp->aux->ksym_lnode.prev == LIST_POISON2;\n+\treturn list_empty(&fp->aux->ksym.lnode) ||\n+\t       fp->aux->ksym.lnode.prev == LIST_POISON2;\n }\n \n void bpf_prog_kallsyms_add(struct bpf_prog *fp)\n@@ -728,7 +728,7 @@ const struct exception_table_entry *search_bpf_extables(unsigned long addr)\n int bpf_get_kallsym(unsigned int symnum, unsigned long *value, char *type,\n \t\t    char *sym)\n {\n-\tstruct bpf_prog_aux *aux;\n+\tstruct bpf_ksym *ksym;\n \tunsigned int it = 0;\n \tint ret = -ERANGE;\n \n@@ -736,13 +736,13 @@ int bpf_get_kallsym(unsigned int symnum, unsigned long *value, char *type,\n \t\treturn ret;\n \n \trcu_read_lock();\n-\tlist_for_each_entry_rcu(aux, &bpf_kallsyms, ksym_lnode) {\n+\tlist_for_each_entry_rcu(ksym, &bpf_kallsyms, lnode) {\n \t\tif (it++ != symnum)\n \t\t\tcontinue;\n \n-\t\tstrncpy(sym, aux->ksym.name, KSYM_NAME_LEN);\n+\t\tstrncpy(sym, ksym->name, KSYM_NAME_LEN);\n \n-\t\t*value = (unsigned long)aux->prog->bpf_func;\n+\t\t*value = ksym->start;\n \t\t*type  = BPF_SYM_ELF_TYPE;\n \n \t\tret = 0;\n",
    "prefixes": [
        "05/18"
    ]
}