From: Kui-Feng Lee <kuifeng@meta.com>
To: <bpf@vger.kernel.org>, <ast@kernel.org>, <andrii@kernel.org>,
<song@kernel.org>, <kernel-team@meta.com>
Cc: Kui-Feng Lee <kuifeng@meta.com>
Subject: [PATCH bpf-next 0/2] Enable bpf_setsockopt() on ktls enabled sockets.
Date: Fri, 20 Jan 2023 18:57:14 -0800 [thread overview]
Message-ID: <20230121025716.3039933-1-kuifeng@meta.com> (raw)
This patchset implements a change to bpf_setsockopt() which allows
ktls enabled sockets to be used with the SOL_TCP level. This is
necessary as when ktls is enabled, it changes the function pointer of
setsockopt of the socket, which bpf_setsockopt() checks in order to
make sure that the socket is a TCP socket. Checking sk_protocol
instead of the function pointer will ensure that bpf_setsockopt() with
the SOL_TCP level still works on sockets with ktls enabled.
Kui-Feng Lee (2):
bpf: Check the protocol of a sock to agree the calls to
bpf_setsockopt().
selftests/bpf: Calls bpf_setsockopt() on a ktls enabled socket.
net/core/filter.c | 2 +-
.../selftests/bpf/prog_tests/setget_sockopt.c | 71 +++++++++++++++++++
.../selftests/bpf/progs/setget_sockopt.c | 8 +++
3 files changed, 80 insertions(+), 1 deletion(-)
--
2.30.2
next reply other threads:[~2023-01-21 2:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-21 2:57 Kui-Feng Lee [this message]
2023-01-21 2:57 ` [PATCH bpf-next 1/2] bpf: Check the protocol of a sock to agree the calls to bpf_setsockopt() Kui-Feng Lee
2023-01-24 0:55 ` Martin KaFai Lau
2023-01-21 2:57 ` [PATCH bpf-next 2/2] selftests/bpf: Calls bpf_setsockopt() on a ktls enabled socket Kui-Feng Lee
2023-01-24 0:52 ` Martin KaFai Lau
2023-01-24 17:11 ` Kui-Feng Lee
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=20230121025716.3039933-1-kuifeng@meta.com \
--to=kuifeng@meta.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=kernel-team@meta.com \
--cc=song@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