Skip to content

Commit 33d21f1

Browse files
iii-iborkmann
authored andcommitted
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: Ilya Leoshkevich <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
1 parent effe5be commit 33d21f1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arch/s390/net/bpf_jit_comp.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,8 @@ static void bpf_jit_prologue(struct bpf_jit *jit, u32 stack_depth)
503503
} else {
504504
/* j tail_call_start: NOP if no tail calls are used */
505505
EMIT4_PCREL(0xa7f40000, 6);
506-
_EMIT2(0);
506+
/* bcr 0,%0 */
507+
EMIT2(0x0700, 0, REG_0);
507508
}
508509
/* Tail calls have to skip above initialization */
509510
jit->tail_call_start = jit->prg;

0 commit comments

Comments
 (0)