On Mon, Nov 18, 2019 at 5:38 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> > 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 836e49855bf9..cad4382c1265 100644 > --- a/include/linux/bpf.h > +++ b/include/linux/bpf.h > @@ -488,6 +488,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; > + } tail_call; > + }; > + u8 ip_stable; this one is bool, any reason you used u8 instead? > + u8 adj_off; > + u16 reason; > +}; > + [...]