mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-31 06:14:39 +01:00
bpf: Add a check for struct bpf_fib_lookup size
The struct bpf_fib_lookup should not grow outside of its 64 bytes. Add a static assert to validate this. Suggested-by: David Ahern <[email protected]> Signed-off-by: Anton Protopopov <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Link: https://lore.kernel.org/bpf/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
This commit is contained in:
1 parent
6efec2cb06
commit
59b418c706
1 file changed
+3
@@ -87,6 +87,9 @@
|
||||
|
||||
#include "dev.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, const struct bpf_prog *prog);
|
||||
|
||||
|
||||
Reference in new issue
Block a user