summaryrefslogtreecommitdiffstats
path: root/arch/x86/Kconfig.cpu
diff options
context:
space:
mode:
authorDaniel Borkmann2015-12-17 23:51:56 +0100
committerDavid S. Miller2015-12-18 22:04:51 +0100
commit606c88a86c77fa27cb4eac899ddced9092825bea (patch)
tree6912e097e8e74ca15f8567739eb4b215845f6bc7 /arch/x86/Kconfig.cpu
parentbpf: fix misleading comment in bpf_convert_filter (diff)
downloadkernel-qcow2-linux-606c88a86c77fa27cb4eac899ddced9092825bea.tar.gz
kernel-qcow2-linux-606c88a86c77fa27cb4eac899ddced9092825bea.tar.xz
kernel-qcow2-linux-606c88a86c77fa27cb4eac899ddced9092825bea.zip
bpf, x86: detect/optimize loading 0 immediates
When sometimes structs or variables need to be initialized/'memset' to 0 in an eBPF C program, the x86 BPF JIT converts this to use immediates. We can however save a couple of bytes (f.e. even up to 7 bytes on a single emmission of BPF_LD | BPF_IMM | BPF_DW) in the image by detecting such case and use xor on the dst register instead. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/x86/Kconfig.cpu')
0 files changed, 0 insertions, 0 deletions