]> git.proxmox.com Git - mirror_ubuntu-kernels.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)
commitf528819334881fd622fdadeddb3f7edaed8b7c9b
tree151b9ecf65ed126be5b63b92bfc8852b2addc41f
parent073815b756c51ba9d8384d924c5d1c03ca3d1ae4
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