From: Martin KaFai Lau <kafai@fb.com>
To: <bpf@vger.kernel.org>
Cc: Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>, <kernel-team@fb.com>,
Lorenz Bauer <lmb@cloudflare.com>, <netdev@vger.kernel.org>
Subject: [PATCH RFC v2 bpf-next 0/2] bpf: Enable bpf_skc_to_* sock casting helper to networking prog type
Date: Tue, 15 Sep 2020 16:18:57 -0700 [thread overview]
Message-ID: <20200915231857.1306320-1-kafai@fb.com> (raw)
This set allows networking prog type to directly read fields from
the in-kernel socket type, e.g. "struct tcp_sock".
Patch 2 has the details on the use case.
It is currently under RFC since it needs proper tests and it builds on
top of Lorenz's patches:
https://lore.kernel.org/bpf/20200910125631.225188-1-lmb@cloudflare.com/
v2:
- Add ARG_PTR_TO_SOCK_COMMON_OR_NULL (Lorenz)
Martin KaFai Lau (2):
bpf: Move the PTR_TO_BTF_ID check to check_reg_type()
bpf: Enable bpf_skc_to_* sock casting helper to networking prog type
include/linux/bpf.h | 1 +
kernel/bpf/verifier.c | 97 +++++++++++++++++++++++++++++--------------
net/core/filter.c | 73 ++++++++++++++++++++++----------
3 files changed, 117 insertions(+), 54 deletions(-)
--
2.24.1
next reply other threads:[~2020-09-15 23:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-15 23:18 Martin KaFai Lau [this message]
2020-09-15 23:19 ` [PATCH RFC v2 bpf-next 1/2] bpf: Move the PTR_TO_BTF_ID check to check_reg_type() Martin KaFai Lau
2020-09-15 23:19 ` [PATCH RFC v2 bpf-next 2/2] bpf: Enable bpf_skc_to_* sock casting helper to networking prog type Martin KaFai Lau
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=20200915231857.1306320-1-kafai@fb.com \
--to=kafai@fb.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=kernel-team@fb.com \
--cc=lmb@cloudflare.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