Re: [PATCH] ARM: kexec: Fix panic after TLB are invalidated

2021-02-05 Thread Giancarlo Ferrari
On Fri, Feb 05, 2021 at 09:44:59AM +, Russell King - ARM Linux admin wrote: > On Fri, Feb 05, 2021 at 12:40:54AM +0000, Giancarlo Ferrari wrote: > > Russell, > > > > On Fri, Feb 05, 2021 at 12:18:33AM +, Russell King - ARM Linux admin > > wrote: > > >

Re: [PATCH] ARM: kexec: Fix panic after TLB are invalidated

2021-02-04 Thread Giancarlo Ferrari
Sorry for polluting, On Fri, Feb 05, 2021 at 12:40:54AM +, Giancarlo Ferrari wrote: > Russell, > > On Fri, Feb 05, 2021 at 12:18:33AM +, Russell King - ARM Linux admin > wrote: > > On Thu, Feb 04, 2021 at 11:48:42PM +, Giancarlo Ferrari wrote: > >

Re: [PATCH] ARM: kexec: Fix panic after TLB are invalidated

2021-02-04 Thread Giancarlo Ferrari
Russell, On Fri, Feb 05, 2021 at 12:18:33AM +, Russell King - ARM Linux admin wrote: > On Thu, Feb 04, 2021 at 11:48:42PM +0000, Giancarlo Ferrari wrote: > > Can I ask about having it integrated ? > > Thanks for testing. Are you willing for me to add: > > Tested-

Re: [PATCH] ARM: kexec: Fix panic after TLB are invalidated

2021-02-04 Thread Giancarlo Ferrari
Hi all, On Mon, Feb 01, 2021 at 10:18:26PM +, Giancarlo Ferrari wrote: > Russell, > > On Mon, Feb 01, 2021 at 08:16:33PM +, Russell King - ARM Linux admin > wrote: > > On Mon, Feb 01, 2021 at 08:07:37PM +, Giancarlo Ferrari wrote: > > > Hi, > >

Re: [PATCH] ARM: kexec: Fix panic after TLB are invalidated

2021-02-01 Thread Giancarlo Ferrari
Russell, On Mon, Feb 01, 2021 at 08:16:33PM +, Russell King - ARM Linux admin wrote: > On Mon, Feb 01, 2021 at 08:07:37PM +0000, Giancarlo Ferrari wrote: > > Hi, > > Hi, > > > Why we should align 3 ? For the fncpy I suppose. > > Slightly arbitary really - it

Re: [PATCH] ARM: kexec: Fix panic after TLB are invalidated

2021-02-01 Thread Giancarlo Ferrari
Hi, On Mon, Feb 01, 2021 at 04:08:38PM +, Russell King - ARM Linux admin wrote: > On Mon, Feb 01, 2021 at 01:57:14PM +, Mark Rutland wrote: > > We could simplify this slightly if we moved the kexec_& variables into a > > struct (using asm-offset KEXEC_VAR_* offsets and a KEXEC_VAR_SIZE

Re: [PATCH] ARM: kexec: Fix panic after TLB are invalidated

2021-02-01 Thread Giancarlo Ferrari
Hi, On Mon, Feb 01, 2021 at 03:30:12PM +, Mark Rutland wrote: > Hi, > > On Mon, Feb 01, 2021 at 02:39:46PM +, Giancarlo Ferrari wrote: > > On Mon, Feb 01, 2021 at 12:47:20PM +, Mark Rutland wrote: > > > On Mon, Feb 01, 2021 at 12:44:56AM +,

Re: [PATCH] ARM: kexec: Fix panic after TLB are invalidated

2021-02-01 Thread Giancarlo Ferrari
Hi, On Mon, Feb 01, 2021 at 12:47:20PM +, Mark Rutland wrote: > On Mon, Feb 01, 2021 at 12:44:56AM +0000, Giancarlo Ferrari wrote: > > machine_kexec() need to set rw permission in text and rodata sections > > to assign some variables (e.g. kexec_start_address). To do that

Re: [PATCH] ARM: kexec: Fix panic after TLB are invalidated

2021-02-01 Thread Giancarlo Ferrari
Hi all, On Tue, Jan 12, 2021 at 04:49:06PM +, Giancarlo Ferrari wrote: > machine_kexec() need to set rw permission in text and rodata sections > to assign some variables (e.g. kexec_start_address). To do that at > the end (after flushing pdm in memory, inv D-Cache, etc.)

[PATCH] ARM: kexec: Fix panic after TLB are invalidated

2021-01-31 Thread Giancarlo Ferrari
] PREEMPT SMP ARM ... Signed-off-by: Giancarlo Ferrari --- arch/arm/kernel/machine_kexec.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/kernel/machine_kexec.c b/arch/arm/kernel/machine_kexec.c index 5d84ad3..23e8816 100644 --- a/arch/arm/kernel/machine_kexec.c +++ b/arch

[PATCH] ARM: kexec: Fix panic after TLB are invalidated

2021-01-12 Thread Giancarlo Ferrari
, which might cause a context switch, there is the risk to inject invalid TLBs, with ro permissions. When trying to assign .text labels, this lead to the following issue: "Unable to handle kernel paging request at virtual address " with FSR 0x80d. Signed-off-by: Giancarlo Ferrari ---