]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
bpf: verifier: centralize const dynptr check in unmark_stack_slots_dynptr()
authorMykyta Yatsenko <yatsenko@meta.com>
Sun, 26 Oct 2025 20:38:48 +0000 (20:38 +0000)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 27 Oct 2025 16:56:27 +0000 (09:56 -0700)
commit9cba966f1c551cb7ebf4b66a5f0df660392c74d6
treea44606b62ea34c7ac925292c6a66526cfd73bc60
parent5a5fff604fa30a581197dca4204c35539fbedddb
bpf: verifier: centralize const dynptr check in unmark_stack_slots_dynptr()

Move the const dynptr check into unmark_stack_slots_dynptr() so callers
don’t have to duplicate it. This puts the validation next to the code
that manipulates dynptr stack slots and allows upcoming changes to reuse
it directly.

Signed-off-by: Mykyta Yatsenko <yatsenko@meta.com>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/r/20251026203853.135105-6-mykyta.yatsenko5@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/verifier.c