]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
bpf: mark all registered map/prog types as __ro_after_init
authorDaniel Borkmann <daniel@iogearbox.net>
Thu, 16 Feb 2017 21:24:48 +0000 (22:24 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 17 Feb 2017 18:40:04 +0000 (13:40 -0500)
commitc78f8bdfa11fcceb9723c61212e4bd8f76c87f9e
tree456eca6a892aea9e8cd9fec3b9ca6b380112d7b2
parentafcb50ba7f745eea32f91d7f63d6aa88f929f9c4
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>
kernel/bpf/arraymap.c
kernel/bpf/hashtab.c
kernel/bpf/lpm_trie.c
kernel/bpf/stackmap.c
kernel/trace/bpf_trace.c
net/core/filter.c