aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/bpf/verifier.c
diff options
context:
space:
mode:
authorMartin KaFai Lau <kafai@fb.com>2020-01-08 16:34:54 -0800
committerAlexei Starovoitov <ast@kernel.org>2020-01-09 08:45:32 -0800
commit65726b5b7efae718391752ae8bb85b9843fd83f4 (patch)
tree4e07d0e4334e550a892f4a05dc89fc1706329aa5 /kernel/bpf/verifier.c
parentselftests/bpf: Restore original comm in test_overhead (diff)
downloadlinux-dev-65726b5b7efae718391752ae8bb85b9843fd83f4.tar.xz
linux-dev-65726b5b7efae718391752ae8bb85b9843fd83f4.zip
bpf: Save PTR_TO_BTF_ID register state when spilling to stack
This patch makes the verifier save the PTR_TO_BTF_ID register state when spilling to the stack. Signed-off-by: Martin KaFai Lau <kafai@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Yonghong Song <yhs@fb.com> Link: https://lore.kernel.org/bpf/20200109003454.3854870-1-kafai@fb.com
Diffstat (limited to '')
-rw-r--r--kernel/bpf/verifier.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index 6f63ae7a370c..d433d70022fd 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -1916,6 +1916,7 @@ static bool is_spillable_regtype(enum bpf_reg_type type)
case PTR_TO_TCP_SOCK:
case PTR_TO_TCP_SOCK_OR_NULL:
case PTR_TO_XDP_SOCK:
+ case PTR_TO_BTF_ID:
return true;
default:
return false;