mbox series

[bpf,v4,0/4] af_unix: MSG_OOB handling fix & selftest

Message ID 20240713200218.2140950-1-mhal@rbox.co (mailing list archive)
Headers show
Series af_unix: MSG_OOB handling fix & selftest | expand

Message

Michal Luczaj July 13, 2024, 7:41 p.m. UTC
PATCH 1/4 tells BPF redirect to silently drop AF_UNIX's MSG_OOB. The rest
is selftest-related.

Michal Luczaj (4):
  af_unix: Disable MSG_OOB handling for sockets in sockmap/sockhash
  selftest/bpf: Support SOCK_STREAM in unix_inet_redir_to_connected()
  selftest/bpf: Parametrize AF_UNIX redir functions to accept send()
    flags
  selftest/bpf: Test sockmap redirect for AF_UNIX MSG_OOB

 net/unix/af_unix.c                            | 41 ++++++++-
 net/unix/unix_bpf.c                           |  3 +
 .../selftests/bpf/prog_tests/sockmap_listen.c | 85 +++++++++++++------
 3 files changed, 102 insertions(+), 27 deletions(-)

Comments

Michal Luczaj July 13, 2024, 8:14 p.m. UTC | #1
On 7/13/24 21:41, Michal Luczaj wrote:
> PATCH 1/4 tells BPF redirect to silently drop AF_UNIX's MSG_OOB. The rest
> is selftest-related.
> 
> Michal Luczaj (4):
>   af_unix: Disable MSG_OOB handling for sockets in sockmap/sockhash
>   selftest/bpf: Support SOCK_STREAM in unix_inet_redir_to_connected()
>   selftest/bpf: Parametrize AF_UNIX redir functions to accept send()
>     flags
>   selftest/bpf: Test sockmap redirect for AF_UNIX MSG_OOB
> 
>  net/unix/af_unix.c                            | 41 ++++++++-
>  net/unix/unix_bpf.c                           |  3 +
>  .../selftests/bpf/prog_tests/sockmap_listen.c | 85 +++++++++++++------
>  3 files changed, 102 insertions(+), 27 deletions(-)

Arrgh, forgot the changelog:

v4:
  - Fix typo; comment, extend and streamline the selftest (Jakub)
  - Fix commit message in PATCH 2/4
  - Collect Reviewed-bys

v3: https://lore.kernel.org/netdev/20240707222842.4119416-1-mhal@rbox.co/
  - Add selftest

v2: https://lore.kernel.org/netdev/20240622223324.3337956-1-mhal@rbox.co/
  - Reduce time under mutex, restructure (Kuniyuki)
  - Handle unix_release_sock() race

v1: https://lore.kernel.org/netdev/20240620203009.2610301-1-mhal@rbox.co/
Jakub Sitnicki July 16, 2024, 8:54 a.m. UTC | #2
On Sat, Jul 13, 2024 at 10:14 PM +02, Michal Luczaj wrote:
> Arrgh, forgot the changelog:

Take a look at b4 for managing patch set the cover letter and changelog:

https://b4.docs.kernel.org/en/latest/
Jakub Sitnicki July 16, 2024, 9:12 a.m. UTC | #3
On Sat, Jul 13, 2024 at 09:41 PM +02, Michal Luczaj wrote:
> PATCH 1/4 tells BPF redirect to silently drop AF_UNIX's MSG_OOB. The rest
> is selftest-related.
>
> Michal Luczaj (4):
>   af_unix: Disable MSG_OOB handling for sockets in sockmap/sockhash
>   selftest/bpf: Support SOCK_STREAM in unix_inet_redir_to_connected()
>   selftest/bpf: Parametrize AF_UNIX redir functions to accept send()
>     flags
>   selftest/bpf: Test sockmap redirect for AF_UNIX MSG_OOB
>
>  net/unix/af_unix.c                            | 41 ++++++++-
>  net/unix/unix_bpf.c                           |  3 +
>  .../selftests/bpf/prog_tests/sockmap_listen.c | 85 +++++++++++++------
>  3 files changed, 102 insertions(+), 27 deletions(-)

Thanks for taking time to extend the tests.

Tested-by: Jakub Sitnicki <jakub@cloudflare.com>
Michal Luczaj July 16, 2024, 8:57 p.m. UTC | #4
On 7/16/24 10:54, Jakub Sitnicki wrote:
> On Sat, Jul 13, 2024 at 10:14 PM +02, Michal Luczaj wrote:
>> Arrgh, forgot the changelog:
> 
> Take a look at b4 for managing patch set the cover letter and changelog:
> 
> https://b4.docs.kernel.org/en/latest/

Thanks, will do.
patchwork-bot+netdevbpf@kernel.org July 17, 2024, 9 p.m. UTC | #5
Hello:

This series was applied to bpf/bpf.git (master)
by Daniel Borkmann <daniel@iogearbox.net>:

On Sat, 13 Jul 2024 21:41:37 +0200 you wrote:
> PATCH 1/4 tells BPF redirect to silently drop AF_UNIX's MSG_OOB. The rest
> is selftest-related.
> 
> Michal Luczaj (4):
>   af_unix: Disable MSG_OOB handling for sockets in sockmap/sockhash
>   selftest/bpf: Support SOCK_STREAM in unix_inet_redir_to_connected()
>   selftest/bpf: Parametrize AF_UNIX redir functions to accept send()
>     flags
>   selftest/bpf: Test sockmap redirect for AF_UNIX MSG_OOB
> 
> [...]

Here is the summary with links:
  - [bpf,v4,1/4] af_unix: Disable MSG_OOB handling for sockets in sockmap/sockhash
    https://git.kernel.org/bpf/bpf/c/638f32604385
  - [bpf,v4,2/4] selftest/bpf: Support SOCK_STREAM in unix_inet_redir_to_connected()
    https://git.kernel.org/bpf/bpf/c/1b0ad43177c0
  - [bpf,v4,3/4] selftest/bpf: Parametrize AF_UNIX redir functions to accept send() flags
    https://git.kernel.org/bpf/bpf/c/0befb349c4cd
  - [bpf,v4,4/4] selftest/bpf: Test sockmap redirect for AF_UNIX MSG_OOB
    https://git.kernel.org/bpf/bpf/c/6caf9efaa169

You are awesome, thank you!