[PATCH bpf-next 0/9] bpf: Constify BPF ops

From: Thomas Weißschuh
Date: Wed Nov 27 2024 - 14:21:26 EST


Move struct bpf_struct_ops into read-only memory to protect against
accidental and malicious modifications.

Signed-off-by: Thomas Weißschuh <linux@xxxxxxxxxxxxxx>
---
Thomas Weißschuh (9):
bpf: tcp: Remove inaccurate comment about extern
bpf: Move func_models from bpf_struct_ops to bpf_struct_ops_desc
bpf: Allow registration of const struct bpf_struct_ops
const_structs.checkpatch: add bpf_struct_ops
bpf: Allow registration of const cfi_stubs
bpf, net: tcp: Constify BPF ops
bpf, net: dummy_ops: Constify BPF ops
HID: bpf: constify BPF ops
sched_ext: Constify BPF ops

drivers/hid/bpf/hid_bpf_struct_ops.c | 4 ++--
include/linux/bpf.h | 8 ++++----
include/linux/btf.h | 2 +-
kernel/bpf/bpf_struct_ops.c | 8 ++++----
kernel/bpf/btf.c | 4 ++--
kernel/sched/ext.c | 4 ++--
net/bpf/bpf_dummy_struct_ops.c | 10 +++++-----
net/ipv4/bpf_tcp_ca.c | 7 +++----
scripts/const_structs.checkpatch | 1 +
9 files changed, 24 insertions(+), 24 deletions(-)
---
base-commit: fc39fb56917bb3cb53e99560ca3612a84456ada2
change-id: 20241127-bpf-const-ops-add2866b3157

Best regards,
--
Thomas Weißschuh <linux@xxxxxxxxxxxxxx>