From: Jakub Sitnicki <jakub@cloudflare.com>
To: John Fastabend <john.fastabend@gmail.com>
Cc: martin.lau@kernel.org, bpf@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH bpf v2 0/2] sockmap fix for KASAN_VMALLOC and af_unix
Date: Fri, 24 Nov 2023 14:53:52 +0100 [thread overview]
Message-ID: <87v89r2r54.fsf@cloudflare.com> (raw)
In-Reply-To: <20231122192452.335312-1-john.fastabend@gmail.com>
On Wed, Nov 22, 2023 at 11:24 AM -08, John Fastabend wrote:
> The af_unix tests in sockmap_listen causes a splat from KASAN_VMALLOC.
> Fix it here and include an extra test to catch case where both pairs
> of the af_unix socket are included in a BPF sockmap.
>
> Also it seems the test infra is not passing type through correctly when
> testing unix_inet_redir_to_connected. Unfortunately, the simple fix
> also caused some CI tests to fail so investigating that now.
>
> v2: drop changes to dgram side its fine per Jakub's point it graps a
> reference on the peer socket from each sendmsg.
>
> John Fastabend (2):
> bpf: sockmap, af_unix stream sockets need to hold ref for pair sock
> bpf: sockmap, add af_unix test with both sockets in map
>
> include/linux/skmsg.h | 1 +
> include/net/af_unix.h | 1 +
> net/core/skmsg.c | 2 +
> net/unix/af_unix.c | 2 -
> net/unix/unix_bpf.c | 5 +++
> .../selftests/bpf/prog_tests/sockmap_listen.c | 39 ++++++++++++++++---
> .../selftests/bpf/progs/test_sockmap_listen.c | 7 ++++
> 7 files changed, 49 insertions(+), 8 deletions(-)
Short of the nit pointed out by Yonghong Song:
Reviewed-by: Jakub Sitnicki <jakub@cloudflare.com>
prev parent reply other threads:[~2023-11-24 13:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-22 19:24 [PATCH bpf v2 0/2] sockmap fix for KASAN_VMALLOC and af_unix John Fastabend
2023-11-22 19:24 ` [PATCH bpf v2 1/2] bpf: sockmap, af_unix stream sockets need to hold ref for pair sock John Fastabend
2023-11-23 17:55 ` Yonghong Song
2023-11-23 20:24 ` Cong Wang
2023-11-24 13:43 ` Jakub Sitnicki
2023-11-22 19:24 ` [PATCH bpf v2 2/2] bpf: sockmap, add af_unix test with both sockets in map John Fastabend
2023-11-24 13:53 ` Jakub Sitnicki [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=87v89r2r54.fsf@cloudflare.com \
--to=jakub@cloudflare.com \
--cc=bpf@vger.kernel.org \
--cc=john.fastabend@gmail.com \
--cc=martin.lau@kernel.org \
--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).