mbox series

[bpf-next,0/2] bpf: Allow doing stack read with size larger than the earlier spilled reg

Message ID 20211102064528.315637-1-kafai@fb.com (mailing list archive)
Headers show
Series bpf: Allow doing stack read with size larger than the earlier spilled reg | expand

Message

Martin KaFai Lau Nov. 2, 2021, 6:45 a.m. UTC
This set fixes an issue that the verifier rejects a u64 stack read
after an earlier u32 scalar spill.  It is caused by the earlier commit
that allows tracking the spilled u32 scalar reg.

Martin KaFai Lau (2):
  bpf: Do not reject when the stack read size is different from the
    tracked scalar size
  bpf: selftest: verifier test on refill from a smaller spill

 kernel/bpf/verifier.c                          | 18 ++++++------------
 .../selftests/bpf/verifier/spill_fill.c        | 17 +++++++++++++++++
 2 files changed, 23 insertions(+), 12 deletions(-)

Comments

patchwork-bot+netdevbpf@kernel.org Nov. 3, 2021, 3 p.m. UTC | #1
Hello:

This series was applied to bpf/bpf.git (master)
by Daniel Borkmann <daniel@iogearbox.net>:

On Mon, 1 Nov 2021 23:45:28 -0700 you wrote:
> This set fixes an issue that the verifier rejects a u64 stack read
> after an earlier u32 scalar spill.  It is caused by the earlier commit
> that allows tracking the spilled u32 scalar reg.
> 
> Martin KaFai Lau (2):
>   bpf: Do not reject when the stack read size is different from the
>     tracked scalar size
>   bpf: selftest: verifier test on refill from a smaller spill
> 
> [...]

Here is the summary with links:
  - [bpf-next,1/2] bpf: Do not reject when the stack read size is different from the tracked scalar size
    https://git.kernel.org/bpf/bpf/c/f30d4968e9ae
  - [bpf-next,2/2] bpf: selftest: verifier test on refill from a smaller spill
    https://git.kernel.org/bpf/bpf/c/c08455dec5ac

You are awesome, thank you!