All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrii Nakryiko <andrii.nakryiko@gmail.com>
To: Hao Luo <haoluo@google.com>
Cc: Networking <netdev@vger.kernel.org>, bpf <bpf@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>,
	"open list:KERNEL SELFTEST FRAMEWORK" 
	<linux-kselftest@vger.kernel.org>, Shuah Khan <shuah@kernel.org>,
	Alexei Starovoitov <ast@kernel.org>,
	Andrii Nakryiko <andriin@fb.com>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
	Yonghong Song <yhs@fb.com>,
	John Fastabend <john.fastabend@gmail.com>,
	KP Singh <kpsingh@chromium.org>,
	Quentin Monnet <quentin@isovalent.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Ingo Molnar <mingo@redhat.com>
Subject: Re: [PATCH bpf-next v3 2/6] bpf/libbpf: BTF support for typed ksyms
Date: Mon, 21 Sep 2020 10:52:41 -0700	[thread overview]
Message-ID: <CAEf4BzbTWGQ4QAOz29Jzj14RwprhsuDSbudU+rrUTaOg9ZP9Zg@mail.gmail.com> (raw)
In-Reply-To: <20200916223512.2885524-3-haoluo@google.com>

On Wed, Sep 16, 2020 at 3:38 PM Hao Luo <haoluo@google.com> wrote:
>
> If a ksym is defined with a type, libbpf will try to find the ksym's btf
> information from kernel btf. If a valid btf entry for the ksym is found,
> libbpf can pass in the found btf id to the verifier, which validates the
> ksym's type and value.
>
> Typeless ksyms (i.e. those defined as 'void') will not have such btf_id,
> but it has the symbol's address (read from kallsyms) and its value is
> treated as a raw pointer.
>
> Signed-off-by: Hao Luo <haoluo@google.com>
> ---

This looks nice and clean, thanks!

Acked-by: Andrii Nakryiko <andriin@fb.com>

>  tools/lib/bpf/libbpf.c | 112 ++++++++++++++++++++++++++++++++++++-----
>  1 file changed, 99 insertions(+), 13 deletions(-)
>

[...]

  reply	other threads:[~2020-09-21 17:52 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-16 22:35 [PATCH bpf-next v3 0/6] bpf: BTF support for ksyms Hao Luo
2020-09-16 22:35 ` [PATCH bpf-next v3 1/6] bpf: Introduce pseudo_btf_id Hao Luo
2020-09-21 17:46   ` Andrii Nakryiko
2020-09-16 22:35 ` [PATCH bpf-next v3 2/6] bpf/libbpf: BTF support for typed ksyms Hao Luo
2020-09-21 17:52   ` Andrii Nakryiko [this message]
2020-09-16 22:35 ` [PATCH bpf-next v3 3/6] selftests/bpf: ksyms_btf to test " Hao Luo
2020-09-21 17:57   ` Andrii Nakryiko
2020-09-16 22:35 ` [PATCH bpf-next v3 4/6] bpf: Introduce bpf_per_cpu_ptr() Hao Luo
2020-09-17  1:14   ` kernel test robot
2020-09-17  1:14     ` kernel test robot
2020-09-17 19:12     ` Hao Luo
2020-09-17 19:12       ` Hao Luo
2020-09-21 18:11       ` Andrii Nakryiko
2020-09-29 23:53         ` Hao Luo
2020-09-29 23:53           ` Hao Luo
2020-09-21 18:08   ` Andrii Nakryiko
2020-09-29 23:52     ` Hao Luo
2020-09-16 22:35 ` [PATCH bpf-next v3 5/6] bpf: Introduce bpf_this_cpu_ptr() Hao Luo
2020-09-16 22:35 ` [PATCH bpf-next v3 6/6] bpf/selftests: Test for bpf_per_cpu_ptr() and bpf_this_cpu_ptr() Hao Luo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAEf4BzbTWGQ4QAOz29Jzj14RwprhsuDSbudU+rrUTaOg9ZP9Zg@mail.gmail.com \
    --to=andrii.nakryiko@gmail.com \
    --cc=andriin@fb.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=haoluo@google.com \
    --cc=john.fastabend@gmail.com \
    --cc=kafai@fb.com \
    --cc=kpsingh@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=quentin@isovalent.com \
    --cc=rostedt@goodmis.org \
    --cc=shuah@kernel.org \
    --cc=songliubraving@fb.com \
    --cc=yhs@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.