mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 14:41:27 +00:00
bpf: mark all registered map/prog types as __ro_after_init
All map types and prog types are registered to the BPF core through bpf_register_map_type() and bpf_register_prog_type() during init and remain unchanged thereafter. As by design we don't (and never will) have any pluggable code that can register to that at any later point in time, lets mark all the existing bpf_{map,prog}_type_list objects in the tree as __ro_after_init, so they can be moved to read-only section from then onwards. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
afcb50ba7f
commit
c78f8bdfa1
6 changed files with 23 additions and 23 deletions
|
@ -508,7 +508,7 @@ static const struct bpf_map_ops trie_ops = {
|
|||
.map_delete_elem = trie_delete_elem,
|
||||
};
|
||||
|
||||
static struct bpf_map_type_list trie_type __read_mostly = {
|
||||
static struct bpf_map_type_list trie_type __ro_after_init = {
|
||||
.ops = &trie_ops,
|
||||
.type = BPF_MAP_TYPE_LPM_TRIE,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue