Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1238829/?format=api
{ "id": 1238829, "url": "http://patchwork.ozlabs.org/api/patches/1238829/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/20200216193005.144157-16-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-16-jolsa@kernel.org>", "list_archive_url": null, "date": "2020-02-16T19:30:02", "name": "[15/18] bpf: Sort bpf kallsyms symbols", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": false, "hash": "2a0d70e47eff554179a125cbdb3e17f5173dc440", "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-16-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/1238829/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1238829/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 48LHLC4B6Dz9sPK\n\tfor <incoming-bpf@patchwork.ozlabs.org>;\n\tMon, 17 Feb 2020 06:31:47 +1100 (AEDT)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1725989AbgBPTbr convert rfc822-to-8bit (ORCPT\n\t<rfc822;incoming-bpf@patchwork.ozlabs.org>);\n\tSun, 16 Feb 2020 14:31:47 -0500", "from us-smtp-2.mimecast.com ([205.139.110.61]:49101 \"EHLO\n\tus-smtp-delivery-1.mimecast.com\" rhost-flags-OK-OK-OK-FAIL)\n\tby vger.kernel.org with ESMTP id S1727974AbgBPTbr (ORCPT\n\t<rfc822;bpf@vger.kernel.org>); Sun, 16 Feb 2020 14:31:47 -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-48-yWm7D4X6ME2LOjQ8WjvdOQ-1; Sun, 16 Feb 2020 14:31:41 -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 1C539107ACCA;\n\tSun, 16 Feb 2020 19:31:39 +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 465CD8AC5B;\n\tSun, 16 Feb 2020 19:31:32 +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 15/18] bpf: Sort bpf kallsyms symbols", "Date": "Sun, 16 Feb 2020 20:30:02 +0100", "Message-Id": "<20200216193005.144157-16-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": "yWm7D4X6ME2LOjQ8WjvdOQ-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": "Currently we don't sort bpf_kallsyms and display symbols\nin proc/kallsyms as they come in via __bpf_ksym_add.\n\nUsing the latch tree to get the next bpf_ksym object\nand insert the new symbol ahead of it.\n\nSigned-off-by: Jiri Olsa <jolsa@kernel.org>\n---\n kernel/bpf/core.c | 21 ++++++++++++++++++++-\n 1 file changed, 20 insertions(+), 1 deletion(-)", "diff": "diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c\nindex 2f857bbfe05c..fa814179730c 100644\n--- a/kernel/bpf/core.c\n+++ b/kernel/bpf/core.c\n@@ -651,9 +651,28 @@ static struct latch_tree_root bpf_progs_tree __cacheline_aligned;\n \n static void __bpf_ksym_add(struct bpf_ksym *ksym)\n {\n+\tstruct list_head *head = &bpf_kallsyms;\n+\tstruct rb_node *next;\n+\n \tWARN_ON_ONCE(!list_empty(&ksym->lnode));\n-\tlist_add_tail_rcu(&ksym->lnode, &bpf_kallsyms);\n \tlatch_tree_insert(&ksym->tnode, &bpf_ksym_tree, &bpf_ksym_tree_ops);\n+\n+\t/*\n+\t * Add ksym into bpf_kallsyms in ordered position,\n+\t * which is prepared for us by latch tree addition.\n+\t *\n+\t * Find out the next symbol and insert ksym right\n+\t * ahead of it. If ksym is the last one, just tail\n+\t * add to the bpf_kallsyms.\n+\t */\n+\tnext = rb_next(&ksym->tnode.node[0]);\n+\tif (next) {\n+\t\tstruct bpf_ksym *ptr;\n+\n+\t\tptr = container_of(next, struct bpf_ksym, tnode.node[0]);\n+\t\thead = &ptr->lnode;\n+\t}\n+\tlist_add_tail_rcu(&ksym->lnode, head);\n }\n \n void bpf_ksym_add(struct bpf_ksym *ksym)\n", "prefixes": [ "15/18" ] }