Alexei Starovoitov <[email protected]> wrote: > On Mon, Feb 23, 2026 at 2:48=E2=80=AFAM Slava Imameev > <[email protected]> wrote: > > > > I think support for broader types can be provided in a compatible way > > with future annotated support, as I explained in my reply to the v2 > > review: > > > > " > > > so I suggest treating 'void **' as a scalar as Eduard suggested. > > > This particular sb_eat_lsm_opts() hook > > > doesn't have a useful type behind it anyway. > > > I'm less certain about 'char **'. If we make it scalar too > > > it will be harder to make it a pointer to nul terminated string later= > . > > > > > So I would do 'void **' -> scalar for now only. > > > > I changed to scalar in v3, keeping broader scope for pointer types. > > > > We encountered double pointers of various types that required > > workarounds, such as: > > > > int __posix_acl_chmod(struct posix_acl **acl, gfp_t gfp, umode_t mode) > > > > Adding support for void** alone doesn't address the broader issue > > with other double pointer types. > > > > When annotated array support (including char**) is added in the > > future, it should remain compatible with the scalar approach for > > legacy (unannotated) parameters. Unannotated parameters will > > continue using scalar handling. > > " > > but then there is no need to relax it for double pointers only. > > - if (is_void_or_int_ptr(btf, t)) > + if (is_void_or_int_ptr(btf, t) || !btf_type_is_struct_ptr(btf, t)) > > would make 'scalar' a fallback for anything unrecognized, > and we can argue that making it smarter in the future > maybe hopefully won't break progs.
I can increase coverage to anything that's not a pointer to structure. I added support only for multi-level pointers of any type because we needed workarounds for them in our development. This was the real case we encountered in practice. Multi-level pointers support appears to be a safe extension since any future support for arrays and output values would require annotation (similar to Microsoft SAL), which differentiates between current unannotated scalar cases and new annotated cases.

