On Wed, Nov 6, 2019 at 9:48 PM Alexei Starovoitov <ast@xxxxxxxxxx> wrote: > > BPF trampoline can be made to work with existing 5 bytes of BPF program > prologue, but let's add 5 bytes of NOPs to the beginning of every JITed BPF > program to make BPF trampoline job easier. They can be removed in the future. > > Signed-off-by: Alexei Starovoitov <ast@xxxxxxxxxx> > --- Acked-by: Andrii Nakryiko <andriin@xxxxxx> > arch/x86/net/bpf_jit_comp.c | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/arch/x86/net/bpf_jit_comp.c b/arch/x86/net/bpf_jit_comp.c > index 44169e8bffc0..260f61276f18 100644 > --- a/arch/x86/net/bpf_jit_comp.c > +++ b/arch/x86/net/bpf_jit_comp.c > @@ -206,7 +206,7 @@ struct jit_context { > /* number of bytes emit_call() needs to generate call instruction */ > #define X86_CALL_SIZE 5 > > -#define PROLOGUE_SIZE 20 > +#define PROLOGUE_SIZE 25 nit: define as 20 + X86_CALL_SIZE ? [...]