mbox series

[bpf,v1,0/2] Fix incorrect pruning for ARG_CONST_ALLOC_SIZE_OR_ZERO

Message ID 20220823185300.406-1-memxor@gmail.com (mailing list archive)
Headers show
Series Fix incorrect pruning for ARG_CONST_ALLOC_SIZE_OR_ZERO | expand

Message

Kumar Kartikeya Dwivedi Aug. 23, 2022, 6:52 p.m. UTC
A fix for a missing mark_chain_precision call that leads to eager pruning and
loading of invalid programs when the more permissive case is in the straight
line exploration. Please see the commit log for details, and selftest for an
example.

Kumar Kartikeya Dwivedi (2):
  bpf: Do mark_chain_precision for ARG_CONST_ALLOC_SIZE_OR_ZERO
  selftests/bpf: Add regression test for pruning fix

 kernel/bpf/verifier.c                         |  3 +++
 .../testing/selftests/bpf/verifier/precise.c  | 25 +++++++++++++++++++
 2 files changed, 28 insertions(+)

Comments

Andrii Nakryiko Aug. 25, 2022, 7:02 p.m. UTC | #1
On Tue, Aug 23, 2022 at 11:53 AM Kumar Kartikeya Dwivedi
<memxor@gmail.com> wrote:
>
> A fix for a missing mark_chain_precision call that leads to eager pruning and
> loading of invalid programs when the more permissive case is in the straight
> line exploration. Please see the commit log for details, and selftest for an
> example.
>
> Kumar Kartikeya Dwivedi (2):
>   bpf: Do mark_chain_precision for ARG_CONST_ALLOC_SIZE_OR_ZERO
>   selftests/bpf: Add regression test for pruning fix
>
>  kernel/bpf/verifier.c                         |  3 +++
>  .../testing/selftests/bpf/verifier/precise.c  | 25 +++++++++++++++++++
>  2 files changed, 28 insertions(+)
>
> --
> 2.34.1
>


Makes sense and LGTM. Thanks!

Acked-by: Andrii Nakryiko <andrii@kernel.org>
patchwork-bot+netdevbpf@kernel.org Aug. 25, 2022, 7:20 p.m. UTC | #2
Hello:

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

On Tue, 23 Aug 2022 20:52:58 +0200 you wrote:
> A fix for a missing mark_chain_precision call that leads to eager pruning and
> loading of invalid programs when the more permissive case is in the straight
> line exploration. Please see the commit log for details, and selftest for an
> example.
> 
> Kumar Kartikeya Dwivedi (2):
>   bpf: Do mark_chain_precision for ARG_CONST_ALLOC_SIZE_OR_ZERO
>   selftests/bpf: Add regression test for pruning fix
> 
> [...]

Here is the summary with links:
  - [bpf,v1,1/2] bpf: Do mark_chain_precision for ARG_CONST_ALLOC_SIZE_OR_ZERO
    https://git.kernel.org/bpf/bpf/c/2fc31465c537
  - [bpf,v1,2/2] selftests/bpf: Add regression test for pruning fix
    https://git.kernel.org/bpf/bpf/c/1800b2ac96d8

You are awesome, thank you!