diff options
author | Daniel Borkmann <daniel@iogearbox.net> | 2015-03-01 06:31:42 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-03-01 14:05:18 -0500 |
commit | a2c83fff582ae133d9f5bb187404ea9ce4da1f96 (patch) | |
tree | 93293fffedc76b48e5ccaefdfd95728719d11753 /kernel/bpf/helpers.c | |
parent | f91fe17e243d1f279d425071a35e3d41290758a0 (diff) |
ebpf: constify various function pointer structs
We can move bpf_map_ops and bpf_verifier_ops and other structs into ro
section, bpf_map_type_list and bpf_prog_type_list into read mostly.
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'kernel/bpf/helpers.c')
-rw-r--r-- | kernel/bpf/helpers.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/bpf/helpers.c b/kernel/bpf/helpers.c index 9e3414d85459..a3c7701a8b5e 100644 --- a/kernel/bpf/helpers.c +++ b/kernel/bpf/helpers.c | |||
@@ -41,7 +41,7 @@ static u64 bpf_map_lookup_elem(u64 r1, u64 r2, u64 r3, u64 r4, u64 r5) | |||
41 | return (unsigned long) value; | 41 | return (unsigned long) value; |
42 | } | 42 | } |
43 | 43 | ||
44 | struct bpf_func_proto bpf_map_lookup_elem_proto = { | 44 | const struct bpf_func_proto bpf_map_lookup_elem_proto = { |
45 | .func = bpf_map_lookup_elem, | 45 | .func = bpf_map_lookup_elem, |
46 | .gpl_only = false, | 46 | .gpl_only = false, |
47 | .ret_type = RET_PTR_TO_MAP_VALUE_OR_NULL, | 47 | .ret_type = RET_PTR_TO_MAP_VALUE_OR_NULL, |
@@ -60,7 +60,7 @@ static u64 bpf_map_update_elem(u64 r1, u64 r2, u64 r3, u64 r4, u64 r5) | |||
60 | return map->ops->map_update_elem(map, key, value, r4); | 60 | return map->ops->map_update_elem(map, key, value, r4); |
61 | } | 61 | } |
62 | 62 | ||
63 | struct bpf_func_proto bpf_map_update_elem_proto = { | 63 | const struct bpf_func_proto bpf_map_update_elem_proto = { |
64 | .func = bpf_map_update_elem, | 64 | .func = bpf_map_update_elem, |
65 | .gpl_only = false, | 65 | .gpl_only = false, |
66 | .ret_type = RET_INTEGER, | 66 | .ret_type = RET_INTEGER, |
@@ -80,7 +80,7 @@ static u64 bpf_map_delete_elem(u64 r1, u64 r2, u64 r3, u64 r4, u64 r5) | |||
80 | return map->ops->map_delete_elem(map, key); | 80 | return map->ops->map_delete_elem(map, key); |
81 | } | 81 | } |
82 | 82 | ||
83 | struct bpf_func_proto bpf_map_delete_elem_proto = { | 83 | const struct bpf_func_proto bpf_map_delete_elem_proto = { |
84 | .func = bpf_map_delete_elem, | 84 | .func = bpf_map_delete_elem, |
85 | .gpl_only = false, | 85 | .gpl_only = false, |
86 | .ret_type = RET_INTEGER, | 86 | .ret_type = RET_INTEGER, |