On Thu, Nov 14, 2019 at 5:05 PM Daniel Borkmann <daniel@xxxxxxxxxxxxx> wrote: > > Add initial poke table data structures and management to the BPF > prog that can later be used by JITs. Also add an instance of poke > specific data for tail call maps. Plan for later work is to extend > this also for BPF static keys. > > Signed-off-by: Daniel Borkmann <daniel@xxxxxxxxxxxxx> > --- looks good, just one more minor naming nit Acked-by: Andrii Nakryiko <andriin@xxxxxx> > include/linux/bpf.h | 20 ++++++++++++++++++++ > include/linux/filter.h | 10 ++++++++++ > kernel/bpf/core.c | 34 ++++++++++++++++++++++++++++++++++ > 3 files changed, 64 insertions(+) > > diff --git a/include/linux/bpf.h b/include/linux/bpf.h > index 40337fa0e463..0ff06a0d0058 100644 > --- a/include/linux/bpf.h > +++ b/include/linux/bpf.h > @@ -484,6 +484,24 @@ struct bpf_func_info_aux { > bool unreliable; > }; > > +enum bpf_jit_poke_reason { > + BPF_POKE_REASON_TAIL_CALL, > +}; > + > +/* Descriptor of pokes pointing /into/ the JITed image. */ > +struct bpf_jit_poke_descriptor { > + void *ip; > + union { > + struct { > + struct bpf_map *map; > + u32 key; > + } tc; tc is a bit overloaded abbreviation, tail_call would be super-clear, though ;) > + }; > + u8 ip_stable; > + u8 adj_off; > + u16 reason; > +}; > + [...]