public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] bpf: use const pointer for struct_ops cfi_stubs
@ 2025-12-31 17:36 Caleb Sander Mateos
  2025-12-31 17:36 ` [PATCH 1/5] " Caleb Sander Mateos
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Caleb Sander Mateos @ 2025-12-31 17:36 UTC (permalink / raw)
  To: Jiri Kosina, Benjamin Tissoires, Alexei Starovoitov,
	Daniel Borkmann, John Fastabend, Andrii Nakryiko,
	Martin KaFai Lau, Eduard Zingerman, Song Liu, Yonghong Song,
	KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa, Tejun Heo,
	David Vernet, Andrea Righi, Changwoo Min, Ingo Molnar,
	Peter Zijlstra, Juri Lelli, Vincent Guittot, Dietmar Eggemann,
	Steven Rostedt, Ben Segall, Mel Gorman, Valentin Schneider,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Simon Horman, David Ahern, Jamal Hadi Salim, Cong Wang,
	Jiri Pirko, D. Wythe, Dust Li, Sidraya Jayagond, Wenjia Zhang,
	Mahanta Jambigi, Tony Lu, Wen Gu, Shuah Khan, Maxime Coquelin,
	Alexandre Torgue
  Cc: linux-input, linux-kernel, bpf, netdev, sched-ext, linux-rdma,
	linux-s390, linux-kselftest, linux-stm32, linux-arm-kernel,
	Caleb Sander Mateos

struct bpf_struct_ops's cfi_stubs field is used as a readonly pointer
but has type void *. Change its type to void const * to allow it to
point to readonly global memory. Update the struct_ops implementations
to declare their cfi_stubs global variables as const.

Caleb Sander Mateos (5):
  bpf: use const pointer for struct_ops cfi_stubs
  HID: bpf: make __bpf_hid_bpf_ops const
  sched_ext: make __bpf_ops_sched_ext_ops const
  net: make cfi_stubs globals const
  selftests/bpf: make cfi_stubs globals const

 drivers/hid/bpf/hid_bpf_struct_ops.c                   |  2 +-
 include/linux/bpf.h                                    |  2 +-
 kernel/bpf/bpf_struct_ops.c                            |  6 +++---
 kernel/sched/ext.c                                     |  2 +-
 net/bpf/bpf_dummy_struct_ops.c                         |  2 +-
 net/ipv4/bpf_tcp_ca.c                                  |  2 +-
 net/sched/bpf_qdisc.c                                  |  2 +-
 net/smc/smc_hs_bpf.c                                   |  2 +-
 .../testing/selftests/bpf/test_kmods/bpf_test_no_cfi.c |  2 +-
 tools/testing/selftests/bpf/test_kmods/bpf_testmod.c   | 10 +++++-----
 10 files changed, 16 insertions(+), 16 deletions(-)

-- 
2.45.2


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2026-01-02 16:19 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-31 17:36 [PATCH 0/5] bpf: use const pointer for struct_ops cfi_stubs Caleb Sander Mateos
2025-12-31 17:36 ` [PATCH 1/5] " Caleb Sander Mateos
2025-12-31 17:36 ` [PATCH 2/5] HID: bpf: make __bpf_hid_bpf_ops const Caleb Sander Mateos
2025-12-31 17:36 ` [PATCH 3/5] sched_ext: make __bpf_ops_sched_ext_ops const Caleb Sander Mateos
2025-12-31 17:36 ` [PATCH 4/5] net: make cfi_stubs globals const Caleb Sander Mateos
2025-12-31 17:36 ` [PATCH 5/5] selftests/bpf: " Caleb Sander Mateos
2025-12-31 18:04   ` bot+bpf-ci
2025-12-31 18:09     ` Caleb Sander Mateos
2025-12-31 18:13       ` Alexei Starovoitov
2026-01-01  0:28         ` Caleb Sander Mateos
2026-01-01  2:10           ` Alexei Starovoitov
2026-01-02 16:19             ` Caleb Sander Mateos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox