mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 15:11:48 -04:00
UPSTREAM: bpf: Add a check for struct bpf_fib_lookup size
[ Upstream commit 59b418c7063d30e0a3e1f592d47df096db83185c ] The struct bpf_fib_lookup should not grow outside of its 64 bytes. Add a static assert to validate this. Suggested-by: David Ahern <dsahern@kernel.org> Change-Id: If4eed17b98c5341e5ad62fa2a23e6e5a203e5137 Signed-off-by: Anton Protopopov <aspsk@isovalent.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20240326101742.17421-4-aspsk@isovalent.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
1f972038ce
commit
28b1aeb95f
1 changed files with 3 additions and 0 deletions
|
|
@ -78,6 +78,9 @@
|
|||
#include <linux/btf_ids.h>
|
||||
#include <net/tls.h>
|
||||
|
||||
/* Keep the struct bpf_fib_lookup small so that it fits into a cacheline */
|
||||
static_assert(sizeof(struct bpf_fib_lookup) == 64, "struct bpf_fib_lookup size check");
|
||||
|
||||
static const struct bpf_func_proto *
|
||||
bpf_sk_base_func_proto(enum bpf_func_id func_id);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue