Re: [PATCH V4 2/2] arm64: bpf: make BPF prologue and epilogue align with ARM64 AAPCS

2015-11-17 Thread David Miller
From: Yang Shi Date: Mon, 16 Nov 2015 14:35:35 -0800 > Save and restore FP/LR in BPF prog prologue and epilogue, save SP to FP > in prologue in order to get the correct stack backtrace. > > However, ARM64 JIT used FP (x29) as eBPF fp register, FP is subjected to > change during function call so

Re: [PATCH V4 2/2] arm64: bpf: make BPF prologue and epilogue align with ARM64 AAPCS

2015-11-17 Thread David Miller
From: Alexei Starovoitov Date: Mon, 16 Nov 2015 20:41:46 -0800 > On Mon, Nov 16, 2015 at 08:37:11PM -0800, Z Lim wrote: >> On Mon, Nov 16, 2015 at 2:35 PM, Yang Shi wrote: >> > Save and restore FP/LR in BPF prog prologue and epilogue, save SP to FP >> > in prologue in order to get the correct st

Re: [PATCH V4 2/2] arm64: bpf: make BPF prologue and epilogue align with ARM64 AAPCS

2015-11-16 Thread Shi, Yang
On 11/16/2015 8:41 PM, Alexei Starovoitov wrote: On Mon, Nov 16, 2015 at 08:37:11PM -0800, Z Lim wrote: On Mon, Nov 16, 2015 at 2:35 PM, Yang Shi wrote: Save and restore FP/LR in BPF prog prologue and epilogue, save SP to FP in prologue in order to get the correct stack backtrace. ... CC: Zi

Re: [PATCH V4 2/2] arm64: bpf: make BPF prologue and epilogue align with ARM64 AAPCS

2015-11-16 Thread Alexei Starovoitov
On Mon, Nov 16, 2015 at 08:37:11PM -0800, Z Lim wrote: > On Mon, Nov 16, 2015 at 2:35 PM, Yang Shi wrote: > > Save and restore FP/LR in BPF prog prologue and epilogue, save SP to FP > > in prologue in order to get the correct stack backtrace. ... > > CC: Zi Shen Lim > > CC: Xi Wang > > Signed-of

Re: [PATCH V4 2/2] arm64: bpf: make BPF prologue and epilogue align with ARM64 AAPCS

2015-11-16 Thread Z Lim
On Mon, Nov 16, 2015 at 2:35 PM, Yang Shi wrote: > Save and restore FP/LR in BPF prog prologue and epilogue, save SP to FP > in prologue in order to get the correct stack backtrace. > > However, ARM64 JIT used FP (x29) as eBPF fp register, FP is subjected to > change during function call so it may

[PATCH V4 2/2] arm64: bpf: make BPF prologue and epilogue align with ARM64 AAPCS

2015-11-16 Thread Yang Shi
Save and restore FP/LR in BPF prog prologue and epilogue, save SP to FP in prologue in order to get the correct stack backtrace. However, ARM64 JIT used FP (x29) as eBPF fp register, FP is subjected to change during function call so it may cause the BPF prog stack base address change too. Use x25