]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Fix maximum permitted number of arguments check
authorYuntao Wang <ytcoode@gmail.com>
Thu, 24 Mar 2022 16:42:38 +0000 (00:42 +0800)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 29 Mar 2022 02:08:17 +0000 (19:08 -0700)
commitfaabd666384fc14fd0b260e6c6c8593ca5637e49
treec00840a8ab95456930d9c5a02e6211d9a48ca4a7
parent0ab1572da68337533e7341325a37c9f9fe8b3924
bpf: Fix maximum permitted number of arguments check

Since the m->arg_size array can hold up to MAX_BPF_FUNC_ARGS argument
sizes, it's ok that nargs is equal to MAX_BPF_FUNC_ARGS.

Signed-off-by: Yuntao Wang <ytcoode@gmail.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Link: https://lore.kernel.org/bpf/20220324164238.1274915-1-ytcoode@gmail.com
kernel/bpf/btf.c