2022-03-09 11:46:21

by Ard Biesheuvel

[permalink] [raw]
Subject: Re: [next] arm: Internal error: Oops: 5 PC is at __read_once_word_nocheck

On Wed, 9 Mar 2022 at 11:37, Russell King (Oracle)
<[email protected]> wrote:
>
> On Wed, Mar 09, 2022 at 03:18:12PM +0530, Naresh Kamboju wrote:
> > While boting linux next-20220308 on BeagleBoard-X15 and qemu arm the following
> > kernel crash reported which is CONFIG_KASAN enabled build [1] & [2].
>
> The unwinder is currently broken in linux-next. Please try reverting
> 532319b9c418 ("ARM: unwind: disregard unwind info before stack frame is
> set up")
>

Yeah.

This is the same spot Corentin hit before, where the double
dereference of vsp is not guarded by anything like
get_kernel_nofault(). We should probably fix that, but that doesn't
address the underlying issue, of course.

I'm a bit puzzled, though, that this appears now, and didn't before.

Naresh, I take it you did not see this occurring on earlier linux-nexts?

I'll try to reproduce this, and see if I can make sense of it. In the
mean time, please do the revert Russell suggested, and if that doesn't
help, maybe try a bisect?


2022-03-09 15:57:39

by Naresh Kamboju

[permalink] [raw]
Subject: Re: [next] arm: Internal error: Oops: 5 PC is at __read_once_word_nocheck

On Wed, 9 Mar 2022 at 16:16, Ard Biesheuvel <[email protected]> wrote:
>
> On Wed, 9 Mar 2022 at 11:37, Russell King (Oracle)
> <[email protected]> wrote:
> >
> > On Wed, Mar 09, 2022 at 03:18:12PM +0530, Naresh Kamboju wrote:
> > > While boting linux next-20220308 on BeagleBoard-X15 and qemu arm the following
> > > kernel crash reported which is CONFIG_KASAN enabled build [1] & [2].
> >
> > The unwinder is currently broken in linux-next. Please try reverting
> > 532319b9c418 ("ARM: unwind: disregard unwind info before stack frame is
> > set up")
> >
>
> Yeah.
>
> This is the same spot Corentin hit before, where the double
> dereference of vsp is not guarded by anything like
> get_kernel_nofault(). We should probably fix that, but that doesn't
> address the underlying issue, of course.
>
> I'm a bit puzzled, though, that this appears now, and didn't before.
>
> Naresh, I take it you did not see this occurring on earlier linux-nexts?

Yes.
Earlier linux-next arm boot failed due to [1],
unwind: Index not found

> I'll try to reproduce this, and see if I can make sense of it. In the
> mean time, please do the revert Russell suggested, and if that doesn't
> help, maybe try a bisect?

I will try your suggestions and get back to you.

- Naresh

[1] https://lore.kernel.org/linux-arm-kernel/[email protected]/T/

2022-03-09 16:10:02

by Naresh Kamboju

[permalink] [raw]
Subject: Re: [next] arm: Internal error: Oops: 5 PC is at __read_once_word_nocheck

On Wed, 9 Mar 2022 at 19:37, Naresh Kamboju <[email protected]> wrote:
>
> On Wed, 9 Mar 2022 at 16:16, Ard Biesheuvel <[email protected]> wrote:
> >
> > On Wed, 9 Mar 2022 at 11:37, Russell King (Oracle)
> > <[email protected]> wrote:
> > >
> > > On Wed, Mar 09, 2022 at 03:18:12PM +0530, Naresh Kamboju wrote:
> > > > While boting linux next-20220308 on BeagleBoard-X15 and qemu arm the following
> > > > kernel crash reported which is CONFIG_KASAN enabled build [1] & [2].
> > >
> > > The unwinder is currently broken in linux-next. Please try reverting
> > > 532319b9c418 ("ARM: unwind: disregard unwind info before stack frame is
> > > set up")

I have reverted the suggested commit and built and boot failed due to reported
kernel crash [1].

- Naresh

[1] https://lkft.validation.linaro.org/scheduler/job/4687876

2022-03-09 16:23:13

by Ard Biesheuvel

[permalink] [raw]
Subject: Re: [next] arm: Internal error: Oops: 5 PC is at __read_once_word_nocheck

On Wed, 9 Mar 2022 at 15:44, Naresh Kamboju <[email protected]> wrote:
>
> On Wed, 9 Mar 2022 at 19:37, Naresh Kamboju <[email protected]> wrote:
> >
> > On Wed, 9 Mar 2022 at 16:16, Ard Biesheuvel <[email protected]> wrote:
> > >
> > > On Wed, 9 Mar 2022 at 11:37, Russell King (Oracle)
> > > <[email protected]> wrote:
> > > >
> > > > On Wed, Mar 09, 2022 at 03:18:12PM +0530, Naresh Kamboju wrote:
> > > > > While boting linux next-20220308 on BeagleBoard-X15 and qemu arm the following
> > > > > kernel crash reported which is CONFIG_KASAN enabled build [1] & [2].
> > > >
> > > > The unwinder is currently broken in linux-next. Please try reverting
> > > > 532319b9c418 ("ARM: unwind: disregard unwind info before stack frame is
> > > > set up")
>
> I have reverted the suggested commit and built and boot failed due to reported
> kernel crash [1].
>
> - Naresh
>

Thanks Naresh,

This looks like it might be related to the issue Russell just sent a fix for:
https://lore.kernel.org/linux-arm-kernel/CAMj1kXEqp2UmsyUe1eWErtpMk3dGEFZyyno3nqydC_ML0bwTLw@mail.gmail.com/T/#t

Could you please try that?