On Wed, 2024-01-17 at 14:33 -0800, Andrii Nakryiko wrote: [...] > + /* special cases */ > + switch (prog->type) { > + case BPF_PROG_TYPE_KPROBE: > + case BPF_PROG_TYPE_PERF_EVENT: > + /* `struct pt_regs *` is expected, but we need to fix up */ > + if (btf_is_struct(t) && strcmp(tname, "pt_regs") == 0) > + return true; > + break; Just to double-check my understanding, in patch #3 you say: > for perf_event kernel allows `struct {pt_regs,user_pt_regs,user_regs_struct} *`. Here `true` is returned only for `pt_regs`, meaning that arch specific types "user_pt_regs" and "user_regs_struct" would not be converted to "bpf_perf_event_data" but "pt_regs" would, right? [...]