diff mbox

[v5sub1,7/8] arm64: move kernel image to base of vmalloc area

Message ID 56C446F8.3050906@arm.com (mailing list archive)
State New, archived
Headers show

Commit Message

James Morse Feb. 17, 2016, 10:10 a.m. UTC
On 17/02/16 09:15, Andrey Ryabinin wrote:
> On 02/16/2016 07:42 PM, Mark Rutland wrote:
>> On Tue, Feb 16, 2016 at 06:36:36PM +0300, Andrey Ryabinin wrote:
>>> You are right. 
>>> So we should write 'shadow_start' instead of 'i'.
>>
>> FWIW with the below patch I don't see any "screwed shadow mapping"
>> warnings on my board, and still later see a tonne of KASAN splats in the
>> scheduler.
>>
> 
> It is possible that I missed something, but I think it means that shadow is alright.
> 
> I wonder whether this happens on 4.4. If not, than something in 4.5-rc1 caused this, and the obvious suspect
> here is irq stack.

This quick hack will prevent ever switching to the irq stack:

---------------------------%<---------------------------
---------------------------%<---------------------------


James

Comments

Catalin Marinas Feb. 17, 2016, 10:19 a.m. UTC | #1
On Wed, Feb 17, 2016 at 10:10:00AM +0000, James Morse wrote:
> On 17/02/16 09:15, Andrey Ryabinin wrote:
> > On 02/16/2016 07:42 PM, Mark Rutland wrote:
> >> On Tue, Feb 16, 2016 at 06:36:36PM +0300, Andrey Ryabinin wrote:
> >>> You are right. 
> >>> So we should write 'shadow_start' instead of 'i'.
> >>
> >> FWIW with the below patch I don't see any "screwed shadow mapping"
> >> warnings on my board, and still later see a tonne of KASAN splats in the
> >> scheduler.
> >>
> > 
> > It is possible that I missed something, but I think it means that shadow is alright.
> > 
> > I wonder whether this happens on 4.4. If not, than something in 4.5-rc1 caused this, and the obvious suspect
> > here is irq stack.
> 
> This quick hack will prevent ever switching to the irq stack:
> 
> ---------------------------%<---------------------------
> diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S
> index 1f7f5a2b61bf..83ae736429b6 100644
> --- a/arch/arm64/kernel/entry.S
> +++ b/arch/arm64/kernel/entry.S
> @@ -188,7 +188,7 @@ alternative_endif
>          */
>         and     x25, x19, #~(THREAD_SIZE - 1)
>         cmp     x25, tsk
> -       b.ne    9998f
> +       b       9998f
> 
>         this_cpu_ptr irq_stack, x25, x26
>         mov     x26, #IRQ_STACK_START_SP

Thanks James. I'll give it a try.
Catalin Marinas Feb. 17, 2016, 10:36 a.m. UTC | #2
On Wed, Feb 17, 2016 at 10:19:41AM +0000, Catalin Marinas wrote:
> On Wed, Feb 17, 2016 at 10:10:00AM +0000, James Morse wrote:
> > On 17/02/16 09:15, Andrey Ryabinin wrote:
> > > On 02/16/2016 07:42 PM, Mark Rutland wrote:
> > >> On Tue, Feb 16, 2016 at 06:36:36PM +0300, Andrey Ryabinin wrote:
> > >>> You are right. 
> > >>> So we should write 'shadow_start' instead of 'i'.
> > >>
> > >> FWIW with the below patch I don't see any "screwed shadow mapping"
> > >> warnings on my board, and still later see a tonne of KASAN splats in the
> > >> scheduler.
> > >>
> > > 
> > > It is possible that I missed something, but I think it means that shadow is alright.
> > > 
> > > I wonder whether this happens on 4.4. If not, than something in 4.5-rc1 caused this, and the obvious suspect
> > > here is irq stack.
> > 
> > This quick hack will prevent ever switching to the irq stack:
> > 
> > ---------------------------%<---------------------------
> > diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S
> > index 1f7f5a2b61bf..83ae736429b6 100644
> > --- a/arch/arm64/kernel/entry.S
> > +++ b/arch/arm64/kernel/entry.S
> > @@ -188,7 +188,7 @@ alternative_endif
> >          */
> >         and     x25, x19, #~(THREAD_SIZE - 1)
> >         cmp     x25, tsk
> > -       b.ne    9998f
> > +       b       9998f
> > 
> >         this_cpu_ptr irq_stack, x25, x26
> >         mov     x26, #IRQ_STACK_START_SP
> 
> Thanks James. I'll give it a try.

And it didn't make any difference (on top of 4.5-rc1), still the same
KASAN warnings.
diff mbox

Patch

diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S
index 1f7f5a2b61bf..83ae736429b6 100644
--- a/arch/arm64/kernel/entry.S
+++ b/arch/arm64/kernel/entry.S
@@ -188,7 +188,7 @@  alternative_endif
         */
        and     x25, x19, #~(THREAD_SIZE - 1)
        cmp     x25, tsk
-       b.ne    9998f
+       b       9998f

        this_cpu_ptr irq_stack, x25, x26
        mov     x26, #IRQ_STACK_START_SP