On Wed, 16 Jul 2025 15:35:16 -0700 Alexei Starovoitov <alexei.starovoitov@xxxxxxxxx> wrote: > 4. > Maybe we should extend clang/gcc to support attr(preserve_access_index) > on x86 and other architectures ;) > We rely heavily on it in bpf backend. > Then one can simply write: > > struct rq___my { > unsigned int nr_pinned; > } __attribute__((preserve_access_index)); > > struct rq___my *rq; > > rq = this_rq(); > rq->nr_pinned++; > > and the compiler will do its magic of offset adjustment. > That's how BPF CORE works. GNU Cauldron in Porto, Portugal is having a kernel track (hopefully if it gets accepted). I highly recommend you attending and recommending these features. It's happening two days after Kernel Recipes (I already booked my plane tickets). https://gcc.gnu.org/wiki/cauldron2025 Peter, maybe you can attend too? -- Steve