bpf: change int cmd argument in __sys_bpf into typed enum bpf_cmd
authorAndrii Nakryiko <andrii@kernel.org>
Thu, 5 Sep 2024 21:05:20 +0000 (14:05 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 5 Sep 2024 23:58:51 +0000 (16:58 -0700)
commit2db2b8cb8f96bb1def9904abbc859d95e3fbf99c
tree1de50f1aa2169ef52af4f3c2bf745928f39b259a
parent1ae497c78f01855f3695b58481311ffdd429b028
bpf: change int cmd argument in __sys_bpf into typed enum bpf_cmd

This improves BTF data recorded about this function and makes
debugging/tracing better, because now command can be displayed as
symbolic name, instead of obscure number.

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20240905210520.2252984-1-andrii@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/syscall.c