On Tue, Dec 5, 2023 at 3:22 PM Eduard Zingerman <eddyz87@xxxxxxxxx> wrote: > > On Mon, 2023-12-04 at 15:39 -0800, Andrii Nakryiko wrote: > > Add ability to pass a pointer to dynptr for global functions by using > > btf_decl_tag("arg:dynptr") tag hint. This allows to have global subprogs > > that accept and work with generic dynptrs that are created by caller. > > Why is this preferable to a check that parameter's BTF type is > STRUCT 'bpf_dynptr'? > For `struct bpf_dynptr *` I think it's acceptable to guess that it's a CONST_PTR_TO_DYNPTR instead of requiring tagging, there is little chance for user's application to have their own data struct called bpf_dynptr. I can make a change to infer this from the type name then. > [...] > >