The timed may_goto fixup now passes the resolved counter pointer through
BPF_REG_AX instead of a stack offset.
Use the pointer directly rather than adding it to RBP. This preserves the
private-stack address selected by the JIT through R9.
Fixes: 2fb761823ead ("bpf, x86: Add x86 JIT support for timed may_goto")
Reported-by: Jeremy Jean <[email protected]>
Link:
https://lore.kernel.org/all/[email protected]/
Signed-off-by: Siddharth Chintamaneni <[email protected]>
---
arch/x86/net/bpf_timed_may_goto.S | 6 ------
1 file changed, 6 deletions(-)
diff --git a/arch/x86/net/bpf_timed_may_goto.S
b/arch/x86/net/bpf_timed_may_goto.S
index 54c690cae190..6e9d9e7c2b1d 100644
--- a/arch/x86/net/bpf_timed_may_goto.S
+++ b/arch/x86/net/bpf_timed_may_goto.S
@@ -11,12 +11,6 @@
SYM_FUNC_START(arch_bpf_timed_may_goto)
ANNOTATE_NOENDBR
- /*
- * r10 passes us stack depth, load the pointer to count and timestamp
- * into r10 by adding it to BPF frame pointer.
- */
- leaq (%rbp, %r10, 1), %r10
-
/* Setup frame. */
pushq %rbp
movq %rsp, %rbp
--
2.43.0