bpf: extract __check_reg_arg() utility function
authorEduard Zingerman <eddyz87@gmail.com>
Tue, 21 Nov 2023 02:06:54 +0000 (04:06 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Feb 2024 00:18:59 +0000 (16:18 -0800)
commitbb8bf2d3caf54804d3f3623651ffcd0e873c81f4
tree76b415838f1cdf29c85abbc1cf4592a8a1ca221b
parente030da5f517c0eb740f2af1a7faef1fbc234bca5
bpf: extract __check_reg_arg() utility function

commit 683b96f9606ab7308ffb23c46ab43cecdef8a241 upstream.

Split check_reg_arg() into two utility functions:
- check_reg_arg() operating on registers from current verifier state;
- __check_reg_arg() operating on a specific set of registers passed as
  a parameter;

The __check_reg_arg() function would be used by a follow-up change for
callbacks handling.

Acked-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Eduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/r/20231121020701.26440-5-eddyz87@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/bpf/verifier.c