On Thu, Jun 10, 2021 at 7:12 AM Lorenz Bauer <lmb@xxxxxxxxxxxxxx> wrote: > > > The idea of basing this on unique fields in types is neat, the > > > downside I see is that we encode the logic in the BPF bitstream. If in > > > the future struct pt_regs is changed, code breaks and we can't do much > > > > If pt_regs fields are renamed all PT_REGS-related stuff, provided by > > libbpf in bpf_tracing.h will break as well and will require > > re-compilation of BPF application. > > I'm thinking more along the lines of, if a PT_REGS definition changes > so that the unique field isn't unique anymore. The BPF is still valid, > but the logic that determines the platform isn't. struct pt_regs is uapi on every arch. They cannot change. New registers can be added :) but the chance is close to zero.