Skip to contentSkip to conversation

bpf: Trim special_kfunc_list in verifier

PATCH Applied Leon Hwang 2 participants 2 messages Aug 12 – Aug 13

Subsystems (2)
lore
Share & tools
lore

Leon Hwang

author
#0 lore raw

PATCH 1/1 bpf: Trim special_kfunc_list in verifier

The commit 7619a0ee9340 ("bpf: Mark existing lock-safe kfuncs with KF_SPINLOCK_SAFE") dropped some helpers in verifier, which also eliminated the use of the following kfuncs from the special_kfunc_list:

* bpf_arena_reserve_pages
* bpf_stream_vprintk
* bpf_stream_print_stack

So, drop them from the special_kfunc_list.

---
 kernel/bpf/verifier.c | 6 ------
 1 file changed, 6 deletions(-)
kernel/bpf/verifier.c +0 -6
index add3affc5703..8797ae08f232 100644
@@ -11092,10 +11092,7 @@ enum special_kfunc_type {
 	KF_bpf_task_work_schedule_resume,
 	KF_bpf_arena_alloc_pages,
 	KF_bpf_arena_free_pages,
-	KF_bpf_arena_reserve_pages,
 	KF_bpf_session_is_return,
-	KF_bpf_stream_vprintk,
-	KF_bpf_stream_print_stack,
 };
 
 BTF_ID_LIST(special_kfunc_list)
@@ -11185,14 +11182,11 @@ BTF_ID(func, bpf_task_work_schedule_signal)
 BTF_ID(func, bpf_task_work_schedule_resume)
 BTF_ID(func, bpf_arena_alloc_pages)
 BTF_ID(func, bpf_arena_free_pages)
-BTF_ID(func, bpf_arena_reserve_pages)
 #ifdef CONFIG_BPF_EVENTS
 BTF_ID(func, bpf_session_is_return)
 #else
 BTF_ID_UNUSED
 #endif
-BTF_ID(func, bpf_stream_vprintk)
-BTF_ID(func, bpf_stream_print_stack)
 
 static bool is_bpf_obj_new_kfunc(u32 func_id)
 {
Signature · 1 line
2.55.0
maintainer Applied
#1 lore raw
Quoted 4 lines · Leon Hwang

The commit 7619a0ee9340 ("bpf: Mark existing lock-safe kfuncs with KF_SPINLOCK_SAFE") dropped some helpers in verifier, which also eliminated the use of the following kfuncs from the special_kfunc_list:

Quoted 8 lines

* bpf_arena_reserve_pages
* bpf_stream_vprintk
* bpf_stream_print_stack

So, drop them from the special_kfunc_list.

---

Applied. pw-bot is asleep.