aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/bpf/arraymap.c10
-rw-r--r--kernel/bpf/hashtab.c8
-rw-r--r--kernel/bpf/lpm_trie.c2
-rw-r--r--kernel/bpf/stackmap.c2
-rw-r--r--kernel/trace/bpf_trace.c6
5 files changed, 14 insertions, 14 deletions
diff --git a/kernel/bpf/arraymap.c b/kernel/bpf/arraymap.c
index 3d55d95dcf49..6b6f41f0b211 100644
--- a/kernel/bpf/arraymap.c
+++ b/kernel/bpf/arraymap.c
@@ -269,7 +269,7 @@ static const struct bpf_map_ops array_ops = {
269 .map_delete_elem = array_map_delete_elem, 269 .map_delete_elem = array_map_delete_elem,
270}; 270};
271 271
272static struct bpf_map_type_list array_type __read_mostly = { 272static struct bpf_map_type_list array_type __ro_after_init = {
273 .ops = &array_ops, 273 .ops = &array_ops,
274 .type = BPF_MAP_TYPE_ARRAY, 274 .type = BPF_MAP_TYPE_ARRAY,
275}; 275};
@@ -283,7 +283,7 @@ static const struct bpf_map_ops percpu_array_ops = {
283 .map_delete_elem = array_map_delete_elem, 283 .map_delete_elem = array_map_delete_elem,
284}; 284};
285 285
286static struct bpf_map_type_list percpu_array_type __read_mostly = { 286static struct bpf_map_type_list percpu_array_type __ro_after_init = {
287 .ops = &percpu_array_ops, 287 .ops = &percpu_array_ops,
288 .type = BPF_MAP_TYPE_PERCPU_ARRAY, 288 .type = BPF_MAP_TYPE_PERCPU_ARRAY,
289}; 289};
@@ -409,7 +409,7 @@ static const struct bpf_map_ops prog_array_ops = {
409 .map_fd_put_ptr = prog_fd_array_put_ptr, 409 .map_fd_put_ptr = prog_fd_array_put_ptr,
410}; 410};
411 411
412static struct bpf_map_type_list prog_array_type __read_mostly = { 412static struct bpf_map_type_list prog_array_type __ro_after_init = {
413 .ops = &prog_array_ops, 413 .ops = &prog_array_ops,
414 .type = BPF_MAP_TYPE_PROG_ARRAY, 414 .type = BPF_MAP_TYPE_PROG_ARRAY,
415}; 415};
@@ -522,7 +522,7 @@ static const struct bpf_map_ops perf_event_array_ops = {
522 .map_release = perf_event_fd_array_release, 522 .map_release = perf_event_fd_array_release,
523}; 523};
524 524
525static struct bpf_map_type_list perf_event_array_type __read_mostly = { 525static struct bpf_map_type_list perf_event_array_type __ro_after_init = {
526 .ops = &perf_event_array_ops, 526 .ops = &perf_event_array_ops,
527 .type = BPF_MAP_TYPE_PERF_EVENT_ARRAY, 527 .type = BPF_MAP_TYPE_PERF_EVENT_ARRAY,
528}; 528};
@@ -564,7 +564,7 @@ static const struct bpf_map_ops cgroup_array_ops = {
564 .map_fd_put_ptr = cgroup_fd_array_put_ptr, 564 .map_fd_put_ptr = cgroup_fd_array_put_ptr,
565}; 565};
566 566
567static struct bpf_map_type_list cgroup_array_type __read_mostly = { 567static struct bpf_map_type_list cgroup_array_type __ro_after_init = {
568 .ops = &cgroup_array_ops, 568 .ops = &cgroup_array_ops,
569 .type = BPF_MAP_TYPE_CGROUP_ARRAY, 569 .type = BPF_MAP_TYPE_CGROUP_ARRAY,
570}; 570};
diff --git a/kernel/bpf/hashtab.c b/kernel/bpf/hashtab.c
index a753bbe7df0a..3ea87fb19a94 100644
--- a/kernel/bpf/hashtab.c
+++ b/kernel/bpf/hashtab.c
@@ -1023,7 +1023,7 @@ static const struct bpf_map_ops htab_ops = {
1023 .map_delete_elem = htab_map_delete_elem, 1023 .map_delete_elem = htab_map_delete_elem,
1024}; 1024};
1025 1025
1026static struct bpf_map_type_list htab_type __read_mostly = { 1026static struct bpf_map_type_list htab_type __ro_after_init = {
1027 .ops = &htab_ops, 1027 .ops = &htab_ops,
1028 .type = BPF_MAP_TYPE_HASH, 1028 .type = BPF_MAP_TYPE_HASH,
1029}; 1029};
@@ -1037,7 +1037,7 @@ static const struct bpf_map_ops htab_lru_ops = {
1037 .map_delete_elem = htab_lru_map_delete_elem, 1037 .map_delete_elem = htab_lru_map_delete_elem,
1038}; 1038};
1039 1039
1040static struct bpf_map_type_list htab_lru_type __read_mostly = { 1040static struct bpf_map_type_list htab_lru_type __ro_after_init = {
1041 .ops = &htab_lru_ops, 1041 .ops = &htab_lru_ops,
1042 .type = BPF_MAP_TYPE_LRU_HASH, 1042 .type = BPF_MAP_TYPE_LRU_HASH,
1043}; 1043};
@@ -1124,7 +1124,7 @@ static const struct bpf_map_ops htab_percpu_ops = {
1124 .map_delete_elem = htab_map_delete_elem, 1124 .map_delete_elem = htab_map_delete_elem,
1125}; 1125};
1126 1126
1127static struct bpf_map_type_list htab_percpu_type __read_mostly = { 1127static struct bpf_map_type_list htab_percpu_type __ro_after_init = {
1128 .ops = &htab_percpu_ops, 1128 .ops = &htab_percpu_ops,
1129 .type = BPF_MAP_TYPE_PERCPU_HASH, 1129 .type = BPF_MAP_TYPE_PERCPU_HASH,
1130}; 1130};
@@ -1138,7 +1138,7 @@ static const struct bpf_map_ops htab_lru_percpu_ops = {
1138 .map_delete_elem = htab_lru_map_delete_elem, 1138 .map_delete_elem = htab_lru_map_delete_elem,
1139}; 1139};
1140 1140
1141static struct bpf_map_type_list htab_lru_percpu_type __read_mostly = { 1141static struct bpf_map_type_list htab_lru_percpu_type __ro_after_init = {
1142 .ops = &htab_lru_percpu_ops, 1142 .ops = &htab_lru_percpu_ops,
1143 .type = BPF_MAP_TYPE_LRU_PERCPU_HASH, 1143 .type = BPF_MAP_TYPE_LRU_PERCPU_HASH,
1144}; 1144};
diff --git a/kernel/bpf/lpm_trie.c b/kernel/bpf/lpm_trie.c
index e0f6a0bd279b..8bfe0afaee10 100644
--- a/kernel/bpf/lpm_trie.c
+++ b/kernel/bpf/lpm_trie.c
@@ -508,7 +508,7 @@ static const struct bpf_map_ops trie_ops = {
508 .map_delete_elem = trie_delete_elem, 508 .map_delete_elem = trie_delete_elem,
509}; 509};
510 510
511static struct bpf_map_type_list trie_type __read_mostly = { 511static struct bpf_map_type_list trie_type __ro_after_init = {
512 .ops = &trie_ops, 512 .ops = &trie_ops,
513 .type = BPF_MAP_TYPE_LPM_TRIE, 513 .type = BPF_MAP_TYPE_LPM_TRIE,
514}; 514};
diff --git a/kernel/bpf/stackmap.c b/kernel/bpf/stackmap.c
index be8519148c25..22aa45cd0324 100644
--- a/kernel/bpf/stackmap.c
+++ b/kernel/bpf/stackmap.c
@@ -273,7 +273,7 @@ static const struct bpf_map_ops stack_map_ops = {
273 .map_delete_elem = stack_map_delete_elem, 273 .map_delete_elem = stack_map_delete_elem,
274}; 274};
275 275
276static struct bpf_map_type_list stack_map_type __read_mostly = { 276static struct bpf_map_type_list stack_map_type __ro_after_init = {
277 .ops = &stack_map_ops, 277 .ops = &stack_map_ops,
278 .type = BPF_MAP_TYPE_STACK_TRACE, 278 .type = BPF_MAP_TYPE_STACK_TRACE,
279}; 279};
diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c
index 424daa4586d1..cee9802cf3e0 100644
--- a/kernel/trace/bpf_trace.c
+++ b/kernel/trace/bpf_trace.c
@@ -506,7 +506,7 @@ static const struct bpf_verifier_ops kprobe_prog_ops = {
506 .is_valid_access = kprobe_prog_is_valid_access, 506 .is_valid_access = kprobe_prog_is_valid_access,
507}; 507};
508 508
509static struct bpf_prog_type_list kprobe_tl = { 509static struct bpf_prog_type_list kprobe_tl __ro_after_init = {
510 .ops = &kprobe_prog_ops, 510 .ops = &kprobe_prog_ops,
511 .type = BPF_PROG_TYPE_KPROBE, 511 .type = BPF_PROG_TYPE_KPROBE,
512}; 512};
@@ -589,7 +589,7 @@ static const struct bpf_verifier_ops tracepoint_prog_ops = {
589 .is_valid_access = tp_prog_is_valid_access, 589 .is_valid_access = tp_prog_is_valid_access,
590}; 590};
591 591
592static struct bpf_prog_type_list tracepoint_tl = { 592static struct bpf_prog_type_list tracepoint_tl __ro_after_init = {
593 .ops = &tracepoint_prog_ops, 593 .ops = &tracepoint_prog_ops,
594 .type = BPF_PROG_TYPE_TRACEPOINT, 594 .type = BPF_PROG_TYPE_TRACEPOINT,
595}; 595};
@@ -648,7 +648,7 @@ static const struct bpf_verifier_ops perf_event_prog_ops = {
648 .convert_ctx_access = pe_prog_convert_ctx_access, 648 .convert_ctx_access = pe_prog_convert_ctx_access,
649}; 649};
650 650
651static struct bpf_prog_type_list perf_event_tl = { 651static struct bpf_prog_type_list perf_event_tl __ro_after_init = {
652 .ops = &perf_event_prog_ops, 652 .ops = &perf_event_prog_ops,
653 .type = BPF_PROG_TYPE_PERF_EVENT, 653 .type = BPF_PROG_TYPE_PERF_EVENT,
654}; 654};