]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Verifier, refine 32bit bound in do_refine_retval_range
authorJohn Fastabend <john.fastabend@gmail.com>
Mon, 30 Mar 2020 21:36:59 +0000 (14:36 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 30 Mar 2020 22:00:30 +0000 (15:00 -0700)
commita7ee846081a63da1eabc85f060931da4f4ba675d
tree60ef9edb0194ededb767393fdc2c9278d5569dd0
parent576785048b47caff1e13bf2c8ff1764c3c7bcabc
bpf: Verifier, refine 32bit bound in do_refine_retval_range

Further refine return values range in do_refine_retval_range by noting
these are int return types (We will assume here that int is a 32-bit type).

Two reasons to pull this out of original patch. First it makes the original
fix impossible to backport. And second I've not seen this as being problematic
in practice unlike the other case.

Fixes: d055298bb70d9 ("bpf/verifier: refine retval R0 state for bpf_get_stack helper")
Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/158560421952.10843.12496354931526965046.stgit@john-Precision-5820-Tower
kernel/bpf/verifier.c