Thread (3 messages) 3 messages, 3 authors, 1d ago

Re: [PATCH bpf-next v2] selftests/bpf: Mask socket type flags in mptcpify prog

From: patchwork-bot+netdevbpf@kernel.org
Date: 2026-07-01 20:00:22
Also in: bpf, linux-kselftest, lkml, mptcp

Hello:

This patch was applied to bpf/bpf-next.git (master)
by Andrii Nakryiko [off-list ref]:

On Tue, 30 Jun 2026 11:57:23 +0200 you wrote:
The mptcpify BPF prog upgrades eligible TCP sockets to MPTCP, but only
when the socket type is exactly SOCK_STREAM. Its update_socket_protocol()
hook runs on the raw type from userspace, before the socket core masks
it with SOCK_TYPE_MASK, so the type may still carry SOCK_CLOEXEC or
SOCK_NONBLOCK in its upper bits and the equality check fails.

As a result, a socket(AF_INET, SOCK_STREAM | SOCK_CLOEXEC, 0) -- what
common libraries do by default -- is silently left as plain TCP. This
was hit in practice with curl. Since mptcpify.c is referenced as example
code for enabling MPTCP transparently, the same mistake is likely to be
copied into real deployments where it fails the same way and is hard to
diagnose.

[...]
Here is the summary with links:
  - [bpf-next,v2] selftests/bpf: Mask socket type flags in mptcpify prog
    https://git.kernel.org/bpf/bpf-next/c/b4b8b334f6b5

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help