On Wed, 20 Jul 2022 at 19:03, Toke Høiland-Jørgensen <toke@xxxxxxxxxx> wrote: > > Kumar Kartikeya Dwivedi <memxor@xxxxxxxxx> writes: > > > As the usage of kfuncs grows, we are starting to form consensus on the > > kinds of attributes and annotations that kfuncs can have. To better help > > developers make sense of the various options available at their disposal > > to present an unstable API to the BPF users, document the various kfunc > > flags and annotations, their expected usage, and explain the process of > > defining and registering a kfunc set. > > [...] > > > +2.4.2 KF_RET_NULL flag > > +---------------------- > > + > > +The KF_RET_NULL flag is used to indicate that the pointer returned by the kfunc > > +may be NULL. Hence, it forces the user to do a NULL check on the pointer > > +returned from the kfunc before making use of it (dereferencing or passing to > > +another helper). This flag is often used in pairing with KF_ACQUIRE flag, but > > +both are mutually exclusive. > > That last sentence is contradicting itself. "Mutually exclusive" means > "can't be used together". I think you mean "orthogonal" or something to > that effect? Right, my bad. Mutually exclusive is totally incorrect here. I will use 'orthogonal' instead. > > -Toke >