]> www.infradead.org Git - users/jedix/linux-maple.git/commit
bpf: Refactor check_ctx_access()
authorAmery Hung <ameryhung@gmail.com>
Fri, 21 Feb 2025 17:56:44 +0000 (09:56 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Sun, 23 Feb 2025 20:18:20 +0000 (12:18 -0800)
commit201b62ccc83153d2925d310a2afe762905e0c455
tree9f2a90ae6aa150d55ceba087f2ba52329a158753
parent63817c771194a9d8e4906686c5c842ac545fcae9
bpf: Refactor check_ctx_access()

Reduce the variable passing madness surrounding check_ctx_access().
Currently, check_mem_access() passes many pointers to local variables to
check_ctx_access(). They are used to initialize "struct
bpf_insn_access_aux info" in check_ctx_access() and then passed to
is_valid_access(). Then, check_ctx_access() takes the data our from
info and write them back the pointers to pass them back. This can be
simpilified by moving info up to check_mem_access().

No functional change.

Signed-off-by: Amery Hung <ameryhung@gmail.com>
Link: https://lore.kernel.org/r/20250221175644.1822383-1-ameryhung@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/verifier.c