All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eduard Zingerman <eddyz87@gmail.com>
To: bot+bpf-ci@kernel.org, memxor@gmail.com, bpf@vger.kernel.org
Cc: sashiko-bot@kernel.org, ast@kernel.org, andrii@kernel.org,
	 daniel@iogearbox.net, emil@etsalapatis.com, kkd@meta.com,
	kernel-team@meta.com, 	martin.lau@kernel.org,
	yonghong.song@linux.dev, clm@meta.com, 	ihor.solodrai@linux.dev
Subject: Re: [PATCH bpf-next v1 03/14] bpf: Preserve R0 lineage across helper calls
Date: Sat, 15 Aug 2026 23:12:20 -0700	[thread overview]
Message-ID: <f342767e1a33839d5074ee90971d832e21845651.camel@gmail.com> (raw)
In-Reply-To: <4f50ce2b6d7a797d977cd80a04a3012fc7dd0c7e57a8cf043f13fe88fee89cc2@mail.kernel.org>

On Sun, 2026-08-16 at 02:30 +0000, bot+bpf-ci@kernel.org wrote:
> > diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
> > index 5d0a2d3ef594..7ef324e384f4 100644
> > --- a/kernel/bpf/verifier.c
> > +++ b/kernel/bpf/verifier.c
> > @@ -11024,13 +11024,13 @@ static int check_helper_call(struct bpf_verifier_env *env, struct bpf_insn *insn
> > 
> >  	/* reset caller saved regs */
> >  	bpf_diag_record_caller_saved(env, regs);
> > +	bpf_diag_mod_begin(env, &regs[BPF_REG_0], NULL, BPF_DIAG_MOD_WRITE);
> >  	for (i = 0; i < CALLER_SAVED_REGS; i++) {
> >  		bpf_mark_reg_not_init(env, &regs[caller_saved[i]]);
> >  		check_reg_arg(env, caller_saved[i], DST_OP_NO_MARK);
> >  	}
> >  	invalidate_outgoing_stack_args(env, cur_func(env));
> > 
> > -	bpf_diag_mod_begin(env, &regs[BPF_REG_0], NULL, BPF_DIAG_MOD_WRITE);
> >  	/* update return register (already marked as written above) */
> >  	ret_type = fn->ret_type;
> >  	ret_flag = type_flag(ret_type);
> 
> Does this produce the correct diagnostic message for void helpers? The
> new bpf_diag_mod_begin() is now opened unconditionally for all helpers,
> including those with RET_VOID. Because the snapshot is taken before the
> caller-saved clearing loop, a void helper now generates a history event
> with R0's real pre-call value as old and NOT_INIT as new, with reason
> BPF_DIAG_MOD_WRITE.

This is fine.

  reply	other threads:[~2026-08-16  6:12 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-16  1:57 [PATCH bpf-next v1 00/14] Follow ups for verifier errors set Kumar Kartikeya Dwivedi
2026-08-16  1:57 ` [PATCH bpf-next v1 01/14] bpf: Correct verifier diagnostic attribution for stack reads Kumar Kartikeya Dwivedi
2026-08-16  6:34   ` Eduard Zingerman
2026-08-16  1:57 ` [PATCH bpf-next v1 02/14] selftests/bpf: Test verifier stack-read diagnostic attribution Kumar Kartikeya Dwivedi
2026-08-16  2:45   ` bot+bpf-ci
2026-08-16  6:35   ` Eduard Zingerman
2026-08-16  1:57 ` [PATCH bpf-next v1 03/14] bpf: Preserve R0 lineage across helper calls Kumar Kartikeya Dwivedi
2026-08-16  2:30   ` bot+bpf-ci
2026-08-16  6:12     ` Eduard Zingerman [this message]
2026-08-16  6:36   ` Eduard Zingerman
2026-08-16  1:57 ` [PATCH bpf-next v1 04/14] bpf: Drop dead spill diagnostic condition Kumar Kartikeya Dwivedi
2026-08-16  6:39   ` Eduard Zingerman
2026-08-16  1:57 ` [PATCH bpf-next v1 05/14] bpf: Use canonical stack argument names in diagnostics Kumar Kartikeya Dwivedi
2026-08-16  6:40   ` Eduard Zingerman
2026-08-16  1:57 ` [PATCH bpf-next v1 06/14] bpf: Correct kfunc argument diagnostics Kumar Kartikeya Dwivedi
2026-08-16  2:45   ` bot+bpf-ci
2026-08-16  6:50     ` Eduard Zingerman
2026-08-16  6:52   ` Eduard Zingerman
2026-08-16  1:57 ` [PATCH bpf-next v1 07/14] selftests/bpf: Test " Kumar Kartikeya Dwivedi
2026-08-16  6:53   ` Eduard Zingerman
2026-08-16  1:57 ` [PATCH bpf-next v1 08/14] bpf: Report non-sleepable kfunc programs accurately Kumar Kartikeya Dwivedi
2026-08-16  2:30   ` bot+bpf-ci
2026-08-16  7:32   ` Eduard Zingerman
2026-08-16  1:57 ` [PATCH bpf-next v1 09/14] selftests/bpf: Test non-sleepable kfunc context Kumar Kartikeya Dwivedi
2026-08-16  2:30   ` bot+bpf-ci
2026-08-16  7:37   ` Eduard Zingerman
2026-08-16  1:57 ` [PATCH bpf-next v1 10/14] bpf: Correct Program Structure diagnostic context Kumar Kartikeya Dwivedi
2026-08-16  2:45   ` bot+bpf-ci
2026-08-16  7:58   ` Eduard Zingerman
2026-08-16  1:57 ` [PATCH bpf-next v1 11/14] bpf: Preserve source attribution without source text Kumar Kartikeya Dwivedi
2026-08-16  8:01   ` Eduard Zingerman
2026-08-16  1:57 ` [PATCH bpf-next v1 12/14] selftests/bpf: Test Program Structure diagnostic context Kumar Kartikeya Dwivedi
2026-08-16  8:06   ` Eduard Zingerman
2026-08-16  1:57 ` [PATCH bpf-next v1 13/14] bpf: Distinguish function references in policy diagnostics Kumar Kartikeya Dwivedi
2026-08-16  8:09   ` Eduard Zingerman
2026-08-16  1:57 ` [PATCH bpf-next v1 14/14] selftests/bpf: Test pseudo-function " Kumar Kartikeya Dwivedi
2026-08-16  2:45   ` bot+bpf-ci

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=f342767e1a33839d5074ee90971d832e21845651.camel@gmail.com \
    --to=eddyz87@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bot+bpf-ci@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=clm@meta.com \
    --cc=daniel@iogearbox.net \
    --cc=emil@etsalapatis.com \
    --cc=ihor.solodrai@linux.dev \
    --cc=kernel-team@meta.com \
    --cc=kkd@meta.com \
    --cc=martin.lau@kernel.org \
    --cc=memxor@gmail.com \
    --cc=sashiko-bot@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.