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)
commitfd0b88f73f5372c08ceff5cc7ddd8ceac502679c
tree292c4dd9e447473e3308fc67627992a41978320a
parent137733d08f4ab14a354dacaa9a8fc35217747605
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