Skip to content

Conversation

@theihor
Copy link
Contributor

@theihor theihor commented Oct 24, 2025

No description provided.

Define KF_IMPLICIT_PROG_AUX_ARG and handle it in the BPF verifier.

The mechanism of patching is exactly the same as for __prog parameter
annotation: in check_kfunc_args() detect the relevant parameter and
remember regno in cur_aux(env)->arg_prog.

Then the (unchanged) fixup_kfunc_call() adds a mov instruction to set
the actual pointer to prog_aux.

The caveat for KF_IMPLICIT_PROG_AUX_ARG is the implicitness. We have
to separately check that the number of arguments is under
MAX_BPF_FUNC_REG_ARGS.

Signed-off-by: Ihor Solodrai <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant