]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Refactor and streamline bounds check into helper
authorDaniel Borkmann <daniel@iogearbox.net>
Tue, 23 Mar 2021 14:05:48 +0000 (15:05 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 16 Apr 2021 21:51:54 +0000 (23:51 +0200)
commit8d1491e2a69b1241b59b3ed9a9481277db8e84e8
tree618347c5c7ee8cb2850bd11502863fa005a5a1f6
parentd4ec52d325f501f86ce20f487bbaedfd0dfd5b2f
bpf: Refactor and streamline bounds check into helper

Move the bounds check in adjust_ptr_min_max_vals() into a small helper named
sanitize_check_bounds() in order to simplify the former a bit.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: John Fastabend <john.fastabend@gmail.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/verifier.c