]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Refine retval for bpf_get_task_stack helper
authorDave Marchevsky <davemarchevsky@fb.com>
Fri, 16 Apr 2021 20:47:02 +0000 (13:47 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 20 Apr 2021 01:23:33 +0000 (18:23 -0700)
commitdd9919b94069cc552c485088e955b1e4507d15f5
tree292c4dd9e447473e3308fc67627992a41978320a
parent2ca07e91b76a27b06ccc39bc33b7950f1776a73c
bpf: Refine retval for bpf_get_task_stack helper

Verifier can constrain the min/max bounds of bpf_get_task_stack's return
value more tightly than the default tnum_unknown. Like bpf_get_stack,
return value is num bytes written into a caller-supplied buf, or error,
so do_refine_retval_range will work.

Signed-off-by: Dave Marchevsky <davemarchevsky@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Song Liu <songliubraving@fb.com>
Link: https://lore.kernel.org/bpf/20210416204704.2816874-2-davemarchevsky@fb.com
kernel/bpf/verifier.c