Skip to content

BPF control flow graph and precision backtrack fixes

Andrii Nakryiko bpf 2 versions – Applied

Status from this message: This series was applied to bpf/bpf.git (master)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 6 repliesApplied 3/3
  2. v14 patches 13 repliesSuperseded

Patches in v2 All 3 applied

#Subject and filesSizeRepliesApplied
1/3bpf: handle ldimm64 properly in check_cfg()include/linux/bpf.h kernel/bpf/verifier.c tools/testing/selftests/bpf/verifier/ld_imm64.c+30 -130 repliesApplied
2/3bpf: fix precision backtracking instruction iterationkernel/bpf/verifier.c+19 -20 repliesApplied
3/3selftests/bpf: add edge case backtracking logic testtools/testing/selftests/bpf/progs/verifier_precision.c+40 -06 repliesApplied

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchEduard Zingerman
1/3A-b
2/3A-b
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 bpf 0/3] BPF control flow graph and precision backtrack fixes

A small fix to BPF verifier's CFG logic around handling and reporting ldimm64 instructions. Patch #1 was previously submitted separately ([0]), and so this patch set supersedes that patch.

Second patch is fixing obscure corner case in mark_chain_precise() logic. See patch for details. Patch #3 adds a dedicated test, however fragile it might.

[0] https://patchwork.kernel.org/project/netdevbpf/patch/[email protected]/

Andrii Nakryiko (3):
bpf: handle ldimm64 properly in check_cfg()
bpf: fix precision backtracking instruction iteration selftests/bpf: add edge case backtracking logic test

 include/linux/bpf.h                           |  8 +++-
 kernel/bpf/verifier.c                         | 48 +++++++++++++++----
 .../selftests/bpf/progs/verifier_precision.c  | 40 ++++++++++++++++
 .../testing/selftests/bpf/verifier/ld_imm64.c |  8 ++--
 4 files changed, 89 insertions(+), 15 deletions(-)
Signature · 1 line
2.34.1