bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
To: Martin KaFai Lau <kafai@fb.com>
Cc: bpf <bpf@vger.kernel.org>,
	Network Development <netdev@vger.kernel.org>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	David Miller <davem@davemloft.net>,
	Kernel Team <kernel-team@fb.com>
Subject: Re: [PATCH v2 bpf-next] bpf: Prepare btf_ctx_access for non raw_tp use case
Date: Thu, 24 Oct 2019 18:47:36 -0700	[thread overview]
Message-ID: <CAADnVQKVtRcOex-2Gw7Gg1ut6SBnYCNxE+F2gj9oN604hV1wLw@mail.gmail.com> (raw)
In-Reply-To: <20191025001811.1718491-1-kafai@fb.com>

On Thu, Oct 24, 2019 at 5:18 PM Martin KaFai Lau <kafai@fb.com> wrote:
>
> This patch makes a few changes to btf_ctx_access() to prepare
> it for non raw_tp use case where the attach_btf_id is not
> necessary a BTF_KIND_TYPEDEF.
>
> It moves the "btf_trace_" prefix check and typedef-follow logic to a new
> function "check_attach_btf_id()" which is called only once during
> bpf_check().  btf_ctx_access() only operates on a BTF_KIND_FUNC_PROTO
> type now. That should also be more efficient since it is done only
> one instead of every-time check_ctx_access() is called.
>
> "check_attach_btf_id()" needs to find the func_proto type from
> the attach_btf_id.  It needs to store the result into the
> newly added prog->aux->attach_func_proto.  func_proto
> btf type has no name, so a proper name should be stored into
> "attach_func_name" also.
>
> v2:
> - Move the "btf_trace_" check to an earlier verifier phase (Alexei)
>
> Signed-off-by: Martin KaFai Lau <kafai@fb.com>

Thank you for sending it early. It's right in the place that I'm
hacking as well.
I'll refactor my work to base on this.
Applied. Thanks.

      reply	other threads:[~2019-10-25  1:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-25  0:18 [PATCH v2 bpf-next] bpf: Prepare btf_ctx_access for non raw_tp use case Martin KaFai Lau
2019-10-25  1:47 ` Alexei Starovoitov [this message]

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=CAADnVQKVtRcOex-2Gw7Gg1ut6SBnYCNxE+F2gj9oN604hV1wLw@mail.gmail.com \
    --to=alexei.starovoitov@gmail.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=kafai@fb.com \
    --cc=kernel-team@fb.com \
    --cc=netdev@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).