* [PATCH bpf] s390/bpf: Use bcr 0,%0 as tail call nop filler
@ 2020-06-02 17:45 Ilya Leoshkevich
2020-06-02 20:36 ` Daniel Borkmann
0 siblings, 1 reply; 2+ messages in thread
From: Ilya Leoshkevich @ 2020-06-02 17:45 UTC (permalink / raw)
To: Alexei Starovoitov, Daniel Borkmann
Cc: bpf, Heiko Carstens, Vasily Gorbik, Sumanth Korikkar, Ilya Leoshkevich
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 <iii@linux.ibm.com>
---
arch/s390/net/bpf_jit_comp.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/s390/net/bpf_jit_comp.c b/arch/s390/net/bpf_jit_comp.c
index 0f37a1b635f8..f4242b894cf2 100644
--- a/arch/s390/net/bpf_jit_comp.c
+++ b/arch/s390/net/bpf_jit_comp.c
@@ -503,7 +503,8 @@ static void bpf_jit_prologue(struct bpf_jit *jit, u32 stack_depth)
} else {
/* j tail_call_start: NOP if no tail calls are used */
EMIT4_PCREL(0xa7f40000, 6);
- _EMIT2(0);
+ /* bcr 0,%0 */
+ EMIT2(0x0700, 0, REG_0);
}
/* Tail calls have to skip above initialization */
jit->tail_call_start = jit->prg;
--
2.25.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH bpf] s390/bpf: Use bcr 0,%0 as tail call nop filler
2020-06-02 17:45 [PATCH bpf] s390/bpf: Use bcr 0,%0 as tail call nop filler Ilya Leoshkevich
@ 2020-06-02 20:36 ` Daniel Borkmann
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Borkmann @ 2020-06-02 20:36 UTC (permalink / raw)
To: Ilya Leoshkevich, Alexei Starovoitov
Cc: bpf, Heiko Carstens, Vasily Gorbik, Sumanth Korikkar
On 6/2/20 7:45 PM, Ilya Leoshkevich wrote:
> 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 <iii@linux.ibm.com>
Applied, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-06-02 20:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-02 17:45 [PATCH bpf] s390/bpf: Use bcr 0,%0 as tail call nop filler Ilya Leoshkevich
2020-06-02 20:36 ` Daniel Borkmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).