]> www.infradead.org Git - users/jedix/linux-maple.git/commit
bpf: Factor out check_load_mem() and check_store_reg()
authorPeilin Ye <yepeilin@google.com>
Mon, 3 Mar 2025 05:37:25 +0000 (05:37 +0000)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 15 Mar 2025 18:48:26 +0000 (11:48 -0700)
commita752ba4332788cd7ddfbe267c392898841799b44
tree84cb48252304dc6970beb4fb9a52a9c9eca28607
parent2626ffe9f33f9e27aa0a60b2761c2d0760dbcca4
bpf: Factor out check_load_mem() and check_store_reg()

Extract BPF_LDX and most non-ATOMIC BPF_STX instruction handling logic
in do_check() into helper functions to be used later.  While we are
here, make that comment about "reserved fields" more specific.

Suggested-by: Eduard Zingerman <eddyz87@gmail.com>
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Signed-off-by: Peilin Ye <yepeilin@google.com>
Link: https://lore.kernel.org/r/8b39c94eac2bb7389ff12392ca666f939124ec4f.1740978603.git.yepeilin@google.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/verifier.c