• Daniel Borkmann's avatar
    bpf, x86: add support for constant blinding · 959a7579
    Daniel Borkmann authored
    This patch adds recently added constant blinding helpers into the
    x86 eBPF JIT. In the bpf_int_jit_compile() path, requirements are
    to utilize bpf_jit_blind_constants()/bpf_jit_prog_release_other()
    pair for rewriting the program into a blinded one, and to map the
    BPF_REG_AX register to a CPU register. The mapping of BPF_REG_AX
    is at non-callee saved register r10, and thus shared with cached
    skb->data used for ld_abs/ind and not in every program type needed.
    When blinding is not used, there's zero additional overhead in the
    generated image.
    Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
    Acked-by: default avatarAlexei Starovoitov <ast@kernel.org>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    959a7579
bpf_jit_comp.c 31.3 KB