]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Move sanitize_val_alu out of op switch
authorDaniel Borkmann <daniel@iogearbox.net>
Wed, 24 Mar 2021 10:25:39 +0000 (11:25 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 16 Apr 2021 21:51:57 +0000 (23:51 +0200)
commited339cd2372b13dcd7742ce5b7ceee8114e6d170
tree151b9ecf65ed126be5b63b92bfc8852b2addc41f
parent8d1491e2a69b1241b59b3ed9a9481277db8e84e8
bpf: Move sanitize_val_alu out of op switch

Add a small sanitize_needed() helper function and move sanitize_val_alu()
out of the main opcode switch. In upcoming work, we'll move sanitize_ptr_alu()
as well out of its opcode switch so this helps to streamline both.

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