]> www.infradead.org Git - users/jedix/linux-maple.git/commit
bpf: Add support for __prog argument suffix to pass in prog->aux
authorKumar Kartikeya Dwivedi <memxor@gmail.com>
Tue, 13 May 2025 14:28:12 +0000 (07:28 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 14 May 2025 01:47:54 +0000 (18:47 -0700)
commitbc049387b41f41bee61e8cc338a5e99ca9798a09
tree8bbcda454e67d13f94721909517957b22c98648e
parent3880cdbed1c4607e378f58fa924c5d6df900d1d3
bpf: Add support for __prog argument suffix to pass in prog->aux

Instead of hardcoding the list of kfuncs that need prog->aux passed to
them with a combination of fixup_kfunc_call adjustment + __ign suffix,
combine both in __prog suffix, which ignores the argument passed in, and
fixes it up to the prog->aux. This allows kfuncs to have the prog->aux
passed into them without having to touch the verifier.

Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Link: https://lore.kernel.org/r/20250513142812.1021591-1-memxor@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Documentation/bpf/kfuncs.rst
include/linux/bpf_verifier.h
kernel/bpf/helpers.c
kernel/bpf/verifier.c