projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1491b73
)
s390/bpf: Use bpf_skip() in bpf_jit_prologue()
author
Ilya Leoshkevich
<iii@linux.ibm.com>
Fri, 17 Jul 2020 16:53:26 +0000
(18:53 +0200)
committer
Alexei Starovoitov
<ast@kernel.org>
Tue, 21 Jul 2020 20:26:25 +0000
(13:26 -0700)
Now that we have bpf_skip() for emitting nops, use it in
bpf_jit_prologue() in order to reduce code duplication.
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link:
https://lore.kernel.org/bpf/20200717165326.6786-6-iii@linux.ibm.com
arch/s390/net/bpf_jit_comp.c
patch
|
blob
|
blame
|
history
diff --git
a/arch/s390/net/bpf_jit_comp.c
b/arch/s390/net/bpf_jit_comp.c
index a78c5b59e1ab6fba497a727867f8b99dd62b3dee..26f97a10e793ed43e3f1fe7672f39c72d934f3b0 100644
(file)
--- a/
arch/s390/net/bpf_jit_comp.c
+++ b/
arch/s390/net/bpf_jit_comp.c
@@
-519,10
+519,11
@@
static void bpf_jit_prologue(struct bpf_jit *jit, u32 stack_depth)
/* xc STK_OFF_TCCNT(4,%r15),STK_OFF_TCCNT(%r15) */
_EMIT6(0xd703f000 | STK_OFF_TCCNT, 0xf000 | STK_OFF_TCCNT);
} else {
- /* j tail_call_start: NOP if no tail calls are used */
- EMIT4_PCREL(0xa7f40000, 6);
- /* bcr 0,%0 */
- EMIT2(0x0700, 0, REG_0);
+ /*
+ * There are no tail calls. Insert nops in order to have
+ * tail_call_start at a predictable offset.
+ */
+ bpf_skip(jit, 6);
}
/* Tail calls have to skip above initialization */
jit->tail_call_start = jit->prg;