• Daniel Borkmann's avatar
    bpf, s390: add support for constant blinding · d93a47f7
    Daniel Borkmann authored
    This patch adds recently added constant blinding helpers into the
    s390 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 r12 and similarly like in x86 case performs reloading when
    ld_abs/ind is used. When blinding is not used, there's no additional
    overhead in the generated image.
    
    When BPF_REG_AX is used, we don't need to emit skb->data reload when
    helper function changed skb->data, as this will be reloaded later
    on anyway from stack on ld_abs/ind, where skb->data is needed. s390
    allows for this w/o much additional complexity unlike f.e. x86.
    Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
    Signed-off-by: default avatarMichael Holzheu <holzheu@linux.vnet.ibm.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    d93a47f7
bpf_jit_comp.c 36.2 KB