mbox series

[v2,bpf,0/3] BPF control flow graph and precision backtrack fixes

Message ID 20231110002638.4168352-1-andrii@kernel.org (mailing list archive)
Headers show
Series BPF control flow graph and precision backtrack fixes | expand

Message

Andrii Nakryiko Nov. 10, 2023, 12:26 a.m. UTC
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/20231101205626.119243-1-andrii@kernel.org/


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(-)

Comments

patchwork-bot+netdevbpf@kernel.org Nov. 10, 2023, 5:50 a.m. UTC | #1
Hello:

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

On Thu, 9 Nov 2023 16:26:35 -0800 you wrote:
> 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.
> 
> [...]

Here is the summary with links:
  - [v2,bpf,1/3] bpf: handle ldimm64 properly in check_cfg()
    https://git.kernel.org/bpf/bpf/c/3feb263bb516
  - [v2,bpf,2/3] bpf: fix precision backtracking instruction iteration
    https://git.kernel.org/bpf/bpf/c/4bb7ea946a37
  - [v2,bpf,3/3] selftests/bpf: add edge case backtracking logic test
    https://git.kernel.org/bpf/bpf/c/62ccdb11d3c6

You are awesome, thank you!