next: Rpi4: Unexpected kernel BRK exception at EL1

Puranjay Mohan puranjay12 at gmail.com
Mon Jun 26 02:04:48 PDT 2023


Hi Naresh,

On Thu, Jun 22, 2023 at 2:35 PM Naresh Kamboju
<naresh.kamboju at linaro.org> wrote:
>
> Hi Mark,
>
> On Thu, 22 Jun 2023 at 15:12, Mark Rutland <mark.rutland at arm.com> wrote:
> >
> > On Wed, Jun 21, 2023 at 01:57:21PM +0100, Mark Rutland wrote:
> > > On Wed, Jun 21, 2023 at 06:06:51PM +0530, Naresh Kamboju wrote:
> > > > Following boot warnings and crashes noticed on arm64 Rpi4 device running
> > > > Linux next-20230621 kernel.
> > > >
> > > > Reported-by: Linux Kernel Functional Testing <lkft at linaro.org>
> > > >
> > > > boot log:
> > > >
> > > > [   22.331748] Kernel text patching generated an invalid instruction
> > > > at 0xffff8000835d6580!
> > > > [   22.340579] Unexpected kernel BRK exception at EL1
> > > > [   22.346141] Internal error: BRK handler: 00000000f2000100 [#1] PREEMPT SMP
> > >
> > > This indicates execution of AARCH64_BREAK_FAULT.
> > >
> > > That could be from dodgy arguments to aarch64_insn_gen_*(), or elsewhere, and
> > > given this is in the networking code I suspect this'll be related to BPF.
> > >
> > > Looking at next-20230621 I see commit:
> > >
> > >   49703aa2adfaff28 ("bpf, arm64: use bpf_jit_binary_pack_alloc")
> > >
> > > ... which changed the way BPF allocates memory, and has code that pads memory
> > > with a bunch of AARCH64_BREAK_FAULT, so it looks like that *might* be related.
> >
> > For the benefit of those just looknig at this thread, there has been some
> > discussion in the original thread for this commit. Summary and links below.
> >
> > We identified a potential issue with missing cache maintenance:
> >
> >   https://lore.kernel.org/linux-arm-kernel/ZJMXqTffB22LSOkd@FVFF77S0Q05N/
> >
> > Puranjay verified that was causing the problem seen here:
> >
> >   https://lore.kernel.org/linux-arm-kernel/CANk7y0h5ucxmMz4K8sGx7qogFyx6PRxYxmFtwTRO7=0Y=B4ugw@mail.gmail.com/
> >
> > Alexei has dropped this commit for now:
> >
> >   https://lore.kernel.org/linux-arm-kernel/CAADnVQJqDOMABEx8JuU6r_Dehyf=SkDfRNChx1oNfqPoo7pSrw@mail.gmail.com/
>
> Thanks for the detailed information.
> I am happy to test any proposed fix patches.

I have sent the v4 of the patch series:
https://lore.kernel.org/bpf/20230626085811.3192402-1-puranjay12@gmail.com/T/#t
This works on my raspberry pi 4 setup. If possible can you test this
on the similar setup where it was failing earlier?

>
>
> >
> > Thanks,
> > Mark.
>
> - Naresh


Thanks,
Puranjay



More information about the linux-arm-kernel mailing list