diff options
author | Daniel Borkmann <daniel@iogearbox.net> | 2016-02-19 22:05:27 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-02-22 03:07:11 (GMT) |
commit | 6205b9cf200d1c3dda5491666ddc33e7b70fe469 (patch) | |
tree | 78c48c223c2b45253361e929a1bffc291dd16925 /mm | |
parent | 2f72959a9c1260ade234f353ccca91118151af66 (diff) | |
download | linux-6205b9cf200d1c3dda5491666ddc33e7b70fe469.tar.xz |
bpf: don't emit mov A,A on return
While debugging with bpf_jit_disasm I noticed emissions of 'mov %eax,%eax',
and found that this comes from BPF_RET | BPF_A translations from classic
BPF. Emitting this is unnecessary as BPF_REG_A is mapped into BPF_REG_0
already, therefore only emit a mov when immediates are used as return value.
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 'mm')
0 files changed, 0 insertions, 0 deletions