From: Alexei Starovoitov <alexei.starovoi...@gmail.com> Date: Fri, 6 Jul 2018 09:30:42 -0700
> Like doing offset rewriting at program load time similar to what we plan > to do for tracing. Tracing programs will be doing 'task->pid' access > and the kernel will adjust offsetof(struct task_struct, pid) during program > load > depending on BTF for the kernel. > The same trick we can do for networking metadata. > The program will contain load instruction md->hash that will get automatically > adjusted to proper offset depending on BTF of 'hash' field in the NIC. > For now I'm proposing _not_ to go that far with offset rewriting and start > with simple steps described above. +1