]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - mkaricheri-ti-linux-kernel/mkaricheri-ti-linux-kernel.git/commit
bpf, x86: add support for constant blinding
authorDaniel Borkmann <daniel@iogearbox.net>
Fri, 13 May 2016 17:08:33 +0000 (19:08 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 May 2016 17:49:32 +0000 (13:49 -0400)
commit959a7579160349d222cc5da30db3b138139b6fbc
tree60cc7d0a58a032b5894766c92218ab2a2b453a7c
parent4f3446bb809f20ad56cadf712e6006815ae7a8f9
bpf, x86: add support for constant blinding

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: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/x86/net/bpf_jit_comp.c