bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Martin KaFai Lau <martin.lau@linux.dev>
To: Daniel Xu <dxu@dxuuu.xyz>
Cc: pabeni@redhat.com, kuba@kernel.org, andrii@kernel.org,
	ast@kernel.org, edumazet@google.com, memxor@gmail.com,
	davem@davemloft.net, daniel@iogearbox.net, eddyz87@gmail.com,
	song@kernel.org, yonghong.song@linux.dev,
	john.fastabend@gmail.com, kpsingh@kernel.org, sdf@fomichev.me,
	haoluo@google.com, jolsa@kernel.org, horms@kernel.org,
	bpf@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH bpf-next v5 2/5] bpf: tcp: Mark bpf_load_hdr_opt() arg2 as read-write
Date: Mon, 16 Dec 2024 10:18:45 -0800	[thread overview]
Message-ID: <4ed0fa29-dd37-4a7e-8ba6-c84af9d735d6@linux.dev> (raw)
In-Reply-To: <3de5c7e513e3161e040ee0ad6eb8cc4b7d71aa4c.1734045451.git.dxu@dxuuu.xyz>

On 12/12/24 3:22 PM, Daniel Xu wrote:
> MEM_WRITE attribute is defined as: "Non-presence of MEM_WRITE means that
> MEM is only being read". bpf_load_hdr_opt() both reads and writes from
> its arg2 - void *search_res.
> 
> This matters a lot for the next commit where we more precisely track
> stack accesses. Without this annotation, the verifier will make false
> assumptions about the contents of memory written to by helpers and
> possibly prune valid branches.

Acked-by: Martin KaFai Lau <martin.lau@kernel.org>


  reply	other threads:[~2024-12-16 18:19 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-12 23:22 [PATCH bpf-next v5 0/5] Support eliding map lookup nullness Daniel Xu
2024-12-12 23:22 ` [PATCH bpf-next v5 1/5] bpf: verifier: Add missing newline on verbose() call Daniel Xu
2024-12-12 23:22 ` [PATCH bpf-next v5 2/5] bpf: tcp: Mark bpf_load_hdr_opt() arg2 as read-write Daniel Xu
2024-12-16 18:18   ` Martin KaFai Lau [this message]
2024-12-12 23:22 ` [PATCH bpf-next v5 3/5] bpf: verifier: Refactor helper access type tracking Daniel Xu
2024-12-13  4:04   ` Eduard Zingerman
2024-12-13 20:02     ` Daniel Xu
2024-12-12 23:22 ` [PATCH bpf-next v5 4/5] bpf: verifier: Support eliding map lookup nullness Daniel Xu
2024-12-13  4:04   ` Eduard Zingerman
2024-12-13 20:57     ` Daniel Xu
2024-12-13 23:02   ` Andrii Nakryiko
2024-12-14  2:44     ` Daniel Xu
2024-12-14  3:13       ` Eduard Zingerman
2024-12-16 23:24         ` Andrii Nakryiko
2024-12-19  0:09           ` Daniel Xu
2024-12-19 21:41           ` Daniel Xu
2024-12-20  0:04             ` Eduard Zingerman
2024-12-20  0:40               ` Daniel Xu
2024-12-20  0:43                 ` Eduard Zingerman
2024-12-20  0:49                   ` Alexei Starovoitov
2024-12-20  4:00                     ` Daniel Xu
2024-12-13 23:10   ` Kumar Kartikeya Dwivedi
2024-12-13 23:14     ` Eduard Zingerman
2024-12-13 23:18       ` Eduard Zingerman
2024-12-12 23:22 ` [PATCH bpf-next v5 5/5] bpf: selftests: verifier: Add nullness elision tests Daniel Xu
2024-12-14  6:17   ` Eduard Zingerman
2024-12-18  1:57     ` Daniel Xu

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=4ed0fa29-dd37-4a7e-8ba6-c84af9d735d6@linux.dev \
    --to=martin.lau@linux.dev \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=dxu@dxuuu.xyz \
    --cc=eddyz87@gmail.com \
    --cc=edumazet@google.com \
    --cc=haoluo@google.com \
    --cc=horms@kernel.org \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kpsingh@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=memxor@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sdf@fomichev.me \
    --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;
as well as URLs for NNTP newsgroup(s).