On Fri, 2025-01-31 at 11:28 -0800, Amery Hung wrote: > From: Amery Hung <amery.hung@xxxxxxxxxxxxx> > > Allows struct_ops programs to acqurie referenced kptrs from arguments > by directly reading the argument. > > The verifier will acquire a reference for struct_ops a argument tagged > with "__ref" in the stub function in the beginning of the main program. > The user will be able to access the referenced kptr directly by reading > the context as long as it has not been released by the program. > > This new mechanism to acquire referenced kptr (compared to the existing > "kfunc with KF_ACQUIRE") is introduced for ergonomic and semantic reasons. > In the first use case, Qdisc_ops, an skb is passed to .enqueue in the > first argument. This mechanism provides a natural way for users to get a > referenced kptr in the .enqueue struct_ops programs and makes sure that a > qdisc will always enqueue or drop the skb. > > Signed-off-by: Amery Hung <amery.hung@xxxxxxxxxxxxx> > --- Acked-by: Eduard Zingerman <eddyz87@xxxxxxxxx> [...]