diff options
| author | Daniel Borkmann <daniel@iogearbox.net> | 2016-02-19 23:05:27 +0100 |
|---|---|---|
| committer | Michael Bestas <mkbestas@lineageos.org> | 2022-04-19 00:50:07 +0300 |
| commit | d6b2448e00268233cc0552e4880a94072250692a (patch) | |
| tree | a1891d342df1a7e70d7102cd4e708d57313b5b58 /kernel/bpf/stackmap.c | |
| parent | b4af04db5d6df4474da18b08ec1c7bb71a7c7a93 (diff) | |
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>
Signed-off-by: Chatur27 <jasonbright2709@gmail.com>
Diffstat (limited to 'kernel/bpf/stackmap.c')
0 files changed, 0 insertions, 0 deletions
