Commit 33d21f18 authored by Ilya Leoshkevich's avatar Ilya Leoshkevich Committed by Daniel Borkmann

s390/bpf: Use bcr 0,%0 as tail call nop filler

Currently used 0x0000 filler confuses bfd disassembler, making bpftool
prog dump xlated output nearly useless. Fix by using a real instruction.
Signed-off-by: default avatarIlya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20200602174555.2501389-1-iii@linux.ibm.com
parent effe5be1
...@@ -503,7 +503,8 @@ static void bpf_jit_prologue(struct bpf_jit *jit, u32 stack_depth) ...@@ -503,7 +503,8 @@ static void bpf_jit_prologue(struct bpf_jit *jit, u32 stack_depth)
} else { } else {
/* j tail_call_start: NOP if no tail calls are used */ /* j tail_call_start: NOP if no tail calls are used */
EMIT4_PCREL(0xa7f40000, 6); EMIT4_PCREL(0xa7f40000, 6);
_EMIT2(0); /* bcr 0,%0 */
EMIT2(0x0700, 0, REG_0);
} }
/* Tail calls have to skip above initialization */ /* Tail calls have to skip above initialization */
jit->tail_call_start = jit->prg; jit->tail_call_start = jit->prg;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment