On Fri, 2024-05-10 at 05:28 -0700, Vadim Fedorenko wrote: > Current verifier checks for the arg to be nullable after checking for > certain pointer types. It prevents programs to pass NULL to kfunc args > even if they are marked as nullable. This patchset adjusts verifier and > changes bpf crypto kfuncs to allow null for IV parameter which is > optional for some ciphers. Benchmark shows ~4% improvements when there > is no need to initialise 0-sized dynptr. > > v2: > - adjust kdoc accordingly > Hi Vadim, sorry for late response. I think that this patch-set looks good, but I'd like to ask you to add a dedicated test to the following file: tools/testing/selftests/bpf/progs/test_kfunc_dynptr_param.c. (crypto tests are for crypto and might be modified in the future w/o consideration of verifier pathways they currently test). Also nullable dynptr sounds kind-of funny. As far as I understand, performance gains are due to omission of extra function call. Did you consider inlining for bpf_dynptr_from_mem()? Same way it is done for bpf_kptr_xchg() in verifier.c:do_misc_fixups(). Thanks, Eduard