BPF List
 help / color / mirror / Atom feed
From: Yonghong Song <yonghong.song@linux.dev>
To: Mahe Tardy <mahe.tardy@gmail.com>, bpf@vger.kernel.org
Cc: ast@kernel.org, daniel@iogearbox.net, john.fastabend@gmail.com,
	eddyz87@gmail.com, andrii@kernel.org, paul.chaignon@gmail.com
Subject: Re: [PATCH bpf-next] verifier: add prune points to live registers print
Date: Mon, 22 Dec 2025 12:50:29 -0800	[thread overview]
Message-ID: <ac1ac629-9e99-43aa-a16c-a81d5fec9820@linux.dev> (raw)
In-Reply-To: <20251222185813.150505-1-mahe.tardy@gmail.com>



On 12/22/25 10:58 AM, Mahe Tardy wrote:
> Explicitly printing where prune points are placed within the
> instructions allows for better debugging of state pruning issues.
>
> 	Live regs before insn, prune points (p), and force checkpoints (P):
> 	      0: ..........   (b7) r1 = 0
> 	      1: .1........   (63) *(u32 *)(r10 -4) = r1
> 	      2: ..........   (bf) r2 = r10
> 	      3: ..2.......   (07) r2 += -4
> 	      4: ..2.......   (18) r1 = 0xffff8cb747b16000
> 	      6: .12.......   (85) call bpf_map_lookup_elem#1
> 	      7: 0..345.... p (bf) r6 = r0
> 	      8: ...3456... p (15) if r6 == 0x0 goto pc+6
> 	      9: ...3456...   (b7) r1 = 5
> 	     10: .1.3456...   (b7) r2 = 3
> 	     11: .123456... p (85) call pc+5
> 	     12: 0.....6... p (67) r0 <<= 32
> 	     13: 0.....6...   (c7) r0 s>>= 32
> 	     14: 0.....6...   (7b) *(u64 *)(r6 +0) = r0
> 	     15: .......... p (b7) r0 = 0
> 	     16: 0.........   (95) exit
> 	     17: .12....... p (bf) r0 = r2
> 	     18: 01........   (0f) r0 += r1
> 	     19: 0.........   (95) exit
>
> Also uses uppercase P for force checkpoints, which are a subset of prune
> points (a force checkpoint should already be a prune point).
>
> 	Live regs before insn, prune points (p), and force checkpoints (P):
> 	      0: .......... p (b7) r1 = 1
> 	      1: .1........ P (e5) may_goto pc+1
> 	      2: ..........   (05) goto pc-3
> 	      3: .1........ p (bf) r0 = r1
> 	      4: 0.........   (95) exit
>
> Existing tests on liveness tracking had to be updated with the new
> output format including the prune points.
>
> This proposal patch was presented at Linux Plumbers 2025 in Tokyo along
> the "Making Sense of State Pruning" presentation[^1] with the intent of
> making state pruning more transparent to the user.
>
> [^1]: https://lpc.events/event/19/contributions/2162/
>
> Co-developed-by: Paul Chaignon <paul.chaignon@gmail.com>
> Signed-off-by: Paul Chaignon <paul.chaignon@gmail.com>
> Signed-off-by: Mahe Tardy <mahe.tardy@gmail.com>

Acked-by: Yonghong Song <yonghong.song@linux.dev>


  reply	other threads:[~2025-12-22 20:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-22 18:58 [PATCH bpf-next] verifier: add prune points to live registers print Mahe Tardy
2025-12-22 20:50 ` Yonghong Song [this message]
2025-12-23  6:32 ` Alexei Starovoitov
2025-12-23 10:12   ` Mahe Tardy
2025-12-29 18:48     ` Eduard Zingerman
2025-12-30  0:42       ` Alexei Starovoitov
2025-12-30  1:13         ` Eduard Zingerman
2025-12-30 18:06           ` Alexei Starovoitov
2025-12-30 18:44             ` Eduard Zingerman
2025-12-31  1:11               ` Alexei Starovoitov
2025-12-31  5:47                 ` Eduard Zingerman

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=ac1ac629-9e99-43aa-a16c-a81d5fec9820@linux.dev \
    --to=yonghong.song@linux.dev \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=john.fastabend@gmail.com \
    --cc=mahe.tardy@gmail.com \
    --cc=paul.chaignon@gmail.com \
    /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