[PATCH bpf-next v1 09/11] bpf: support "__uninit" iterator arguments in generic kfuncs

sashiko-bot at kernel.org sashiko-bot at kernel.org
Tue Oct 13 17:04:52 UTC 2026


> Iterator constructors are recognised by their KF_ITER_NEW flag, which
> binds them to the bpf_iter_<type>_new() name and so to a single
> constructor per type.  A kfunc that initializes an iterator from inputs
> that naming convention cannot express - e.g. another, already
> initialized iterator - therefore cannot be a constructor.
> 
> Let such a kfunc mark its destination argument with the "__uninit"
> suffix already used for dynptr out-arguments: process_iter_arg() now
> decides per argument, rather than per kfunc, whether it initializes the
> iterator or operates on an initialized one.  Only iterator-typed
> arguments are reclassified, so dynptr "__uninit" out-arguments are
> unaffected.
> 
> The first user is the path ancestor iterator handover added by the next
> patch.
> 
> Signed-off-by: Justin Suess <utilityemal77 at gmail.com>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261013164800.2906577-1-utilityemal77@gmail.com?part=9




More information about the Linux-security-module-archive mailing list