bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf 0/2] sockmap fix for KASAN_VMALLOC and af_unix
@ 2023-10-16 19:08 John Fastabend
  2023-10-16 19:08 ` [PATCH bpf 1/2] bpf: sockmap, af_unix sockets need to hold ref for pair sock John Fastabend
  2023-10-16 19:08 ` [PATCH bpf 2/2] bpf: sockmap, add af_unix test with both sockets in map John Fastabend
  0 siblings, 2 replies; 16+ messages in thread
From: John Fastabend @ 2023-10-16 19:08 UTC (permalink / raw)
  To: bpf, netdev; +Cc: yangyingliang, jakub, martin.lau, john.fastabend

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.

John Fastabend (2):
  bpf: sockmap, af_unix 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                           | 10 +++++
 .../selftests/bpf/prog_tests/sockmap_listen.c | 39 ++++++++++++++++---
 .../selftests/bpf/progs/test_sockmap_listen.c |  7 ++++
 7 files changed, 54 insertions(+), 8 deletions(-)

-- 
2.33.0


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2023-11-22 19:26 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-16 19:08 [PATCH bpf 0/2] sockmap fix for KASAN_VMALLOC and af_unix John Fastabend
2023-10-16 19:08 ` [PATCH bpf 1/2] bpf: sockmap, af_unix sockets need to hold ref for pair sock John Fastabend
2023-10-18 10:40   ` Jakub Sitnicki
2023-10-24 21:39     ` John Fastabend
2023-10-27 13:32       ` Jakub Sitnicki
2023-10-27 17:38         ` Kuniyuki Iwashima
2023-10-28  7:33           ` Jakub Sitnicki
2023-11-04  3:38             ` John Fastabend
2023-11-06 10:15               ` Jakub Sitnicki
2023-11-06 12:35   ` Jakub Sitnicki
2023-11-20 21:13     ` Martin KaFai Lau
2023-11-21 20:40       ` John Fastabend
2023-11-22 19:26         ` John Fastabend
2023-10-16 19:08 ` [PATCH bpf 2/2] bpf: sockmap, add af_unix test with both sockets in map John Fastabend
2023-11-06 12:44   ` Jakub Sitnicki
2023-11-06 14:42     ` Jakub Sitnicki

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).