Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: patchwork-bot+netdevbpf@kernel.org
To: Jiayuan Chen <jiayuan.chen@linux.dev>
Cc: bpf@vger.kernel.org, M202472210@hust.edu.cn, dddddd@hust.edu.cn,
	dzm91@hust.edu.cn, daniel@iogearbox.net,
	john.fastabend@gmail.com, sdf@fomichev.me, martin.lau@linux.dev,
	ast@kernel.org, andrii@kernel.org, eddyz87@gmail.com,
	memxor@gmail.com, song@kernel.org, yonghong.song@linux.dev,
	jolsa@kernel.org, emil@etsalapatis.com, ihor.solodrai@linux.dev,
	davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org,
	pabeni@redhat.com, horms@kernel.org, shuah@kernel.org,
	ameryhung@gmail.com, martin.teichmann@xfel.eu,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-kselftest@vger.kernel.org
Subject: Re: [PATCH bpf v2 1/2] bpf: Fix verifier WARN on narrow read of bpf_tcp_sock u64 fields
Date: Sat, 17 Oct 2026 17:30:05 +0000	[thread overview]
Message-ID: <179225820531.1342507.15548197169352983692.git-patchwork-notify@kernel.org> (raw)
In-Reply-To: <20261017143819.209510-1-jiayuan.chen@linux.dev>

Hello:

This series was applied to bpf/bpf-next.git (master)
by Alexei Starovoitov <ast@kernel.org>:

On Sat, 17 Oct 2026 22:38:12 +0800 you wrote:
> A BPF program can read the middle of a u64 field in struct bpf_tcp_sock:
> 
> 	tp = bpf_tcp_sock(listener);
> 	/* +0x54 is in the middle of the u64 bytes_received */
> 	unsigned hi = *(unsigned *)((char *)tp + 0x54);
> 
> bpf_tcp_sock_is_valid_access() allows this 4-byte read (the default case
> only checks size == 4), but bpf_tcp_sock_convert_ctx_access() only knows
> the field starts and has no idea how to handle such an offset. It emits
> no instruction, cnt stays 0 and the fixup pass trips verifier_bug():
> 
> [...]

Here is the summary with links:
  - [bpf,v2,1/2] bpf: Fix verifier WARN on narrow read of bpf_tcp_sock u64 fields
    https://git.kernel.org/bpf/bpf-next/c/af873495cbcb
  - [bpf,v2,2/2] selftests/bpf: Test narrow read of bpf_tcp_sock u64 fields
    https://git.kernel.org/bpf/bpf-next/c/5256161e3573

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



      parent reply	other threads:[~2026-10-17 17:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-17 14:38 [PATCH bpf v2 1/2] bpf: Fix verifier WARN on narrow read of bpf_tcp_sock u64 fields Jiayuan Chen
2026-10-17 14:38 ` [PATCH bpf v2 2/2] selftests/bpf: Test " Jiayuan Chen
2026-10-17 17:30 ` patchwork-bot+netdevbpf [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=179225820531.1342507.15548197169352983692.git-patchwork-notify@kernel.org \
    --to=patchwork-bot+netdevbpf@kernel.org \
    --cc=M202472210@hust.edu.cn \
    --cc=ameryhung@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=dddddd@hust.edu.cn \
    --cc=dzm91@hust.edu.cn \
    --cc=eddyz87@gmail.com \
    --cc=edumazet@kernel.org \
    --cc=emil@etsalapatis.com \
    --cc=horms@kernel.org \
    --cc=ihor.solodrai@linux.dev \
    --cc=jiayuan.chen@linux.dev \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=martin.teichmann@xfel.eu \
    --cc=memxor@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sdf@fomichev.me \
    --cc=shuah@kernel.org \
    --cc=song@kernel.org \
    --cc=yonghong.song@linux.dev \
    /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