Skip to content

Commit 2db2b8c

Browse files
anakryikoAlexei Starovoitov
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
1 parent 1ae497c commit 2db2b8c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/bpf/syscall.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5670,7 +5670,7 @@ static int token_create(union bpf_attr *attr)
56705670
return bpf_token_create(attr);
56715671
}
56725672

5673-
static int __sys_bpf(int cmd, bpfptr_t uattr, unsigned int size)
5673+
static int __sys_bpf(enum bpf_cmd cmd, bpfptr_t uattr, unsigned int size)
56745674
{
56755675
union bpf_attr attr;
56765676
int err;

0 commit comments

Comments
 (0)