public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Naresh Kamboju <naresh.kamboju@linaro.org>
Cc: open list <linux-kernel@vger.kernel.org>,
	Linux-Next Mailing List <linux-next@vger.kernel.org>,
	lkft-triage@lists.linaro.org,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	Thomas Gleixner <tglx@linutronix.de>,
	pali@kernel.org, Ingo Molnar <mingo@kernel.org>
Subject: Re: Unexpected kernel BRK exception at EL1 - Internal error: BRK handler: f20003e8 - gic_dist_config
Date: Mon, 16 May 2022 15:48:57 +0100	[thread overview]
Message-ID: <87k0al5y92.wl-maz@kernel.org> (raw)
In-Reply-To: <CA+G9fYtLP1Kf1Ck-33XrLFQ5uc_p1z1S5Sr1x=9ZRGi=D851PQ@mail.gmail.com>

On Mon, 16 May 2022 14:58:28 +0100,
Naresh Kamboju <naresh.kamboju@linaro.org> wrote:
> 
> Hi Marc,
> 
> Thanks for looking into this report.
> 
> On Mon, 16 May 2022 at 12:38, Marc Zyngier <maz@kernel.org> wrote:
> >
> > On Mon, 16 May 2022 07:16:22 +0100,
> > Naresh Kamboju <naresh.kamboju@linaro.org> wrote:
> > >
> > > The kernel crash reported on arm64 juno-r2 device with kselftest-merge config
> > > while booting Linux next-20220513 kernel  [1].
> 
> <trim>
> 
> >
> > Huh. Who inserts random BRKs like this?
> >
> > > [    0.000000] Internal error: BRK handler: f20003e8 [#1] PREEMPT SMP
> > > [    0.000000] Modules linked in:
> > > [    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted
> > > 5.18.0-rc6-next-20220513 #1
> > > [    0.000000] Hardware name: ARM Juno development board (r2) (DT)
> > > [    0.000000] pstate: 600000c5 (nZCv daIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
> > > [    0.000000] pc : gic_dist_config+0x4c/0x68
> > > [    0.000000] lr : gic_init_bases+0xd4/0x248
> >
> > Please provide a disassembly of this function.
> 
> objdump snipper is here.
> http://ix.io/3XUW

Wrong function (I wasn't clear I wanted the breaking function, not the
caller).

> The vmlinux file is located in this url
> Please make use of it.
> http://snapshots.linaro.org/openembedded/lkft/lkft/sumo/juno/lkft/linux-next/1226/

ffff8000087f9908 <gic_dist_config>:
ffff8000087f9908:       a9bd7bfd        stp     x29, x30, [sp, #-48]!
ffff8000087f990c:       910003fd        mov     x29, sp
ffff8000087f9910:       a90153f3        stp     x19, x20, [sp, #16]
ffff8000087f9914:       f90013f5        str     x21, [sp, #32]
ffff8000087f9918:       2a0103f3        mov     w19, w1
ffff8000087f991c:       aa0003f4        mov     x20, x0
ffff8000087f9920:       aa0203f5        mov     x21, x2
ffff8000087f9924:       aa1e03e0        mov     x0, x30
ffff8000087f9928:       97e0de72        bl      ffff8000080312f0 <_mcount>
ffff8000087f992c:       7100827f        cmp     w19, #0x20
ffff8000087f9930:       54000149        b.ls    ffff8000087f9958 <gic_dist_config+0x50>  // b.plast
ffff8000087f9934:       52800402        mov     w2, #0x20                       // #32
ffff8000087f9938:       53027c40        lsr     w0, w2, #2
ffff8000087f993c:       91300000        add     x0, x0, #0xc00
ffff8000087f9940:       8b000280        add     x0, x20, x0
ffff8000087f9944:       b900001f        str     wzr, [x0]
ffff8000087f9948:       11004042        add     w2, w2, #0x10
ffff8000087f994c:       6b02027f        cmp     w19, w2
ffff8000087f9950:       54ffff48        b.hi    ffff8000087f9938 <gic_dist_config+0x30>  // b.pmore
ffff8000087f9954:       d4207d00        brk     #0x3e8

What the hell is this??? This function has no WARN_ON, no BUG_ON, the
allowed values for the immediate are:

#define KPROBES_BRK_IMM                 0x004
#define UPROBES_BRK_IMM                 0x005
#define KPROBES_BRK_SS_IMM              0x006
#define FAULT_BRK_IMM                   0x100
#define KGDB_DYN_DBG_BRK_IMM            0x400
#define KGDB_COMPILED_DBG_BRK_IMM       0x401
#define BUG_BRK_IMM                     0x800
#define KASAN_BRK_IMM                   0x900
#define KASAN_BRK_MASK                  0x0ff

and 0x3e8 isn't one of them. This seems like a GCC 'division by zero'
hack, but there are no divisions by zero here. Your kernel is also
full of the stuff.

What sort of odd options do you have? I can't help but notice that you
have the Rust stuff in your tree. Can you please start by disabling
this, just in case there is an interaction with your toolchain?

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.

      parent reply	other threads:[~2022-05-16 14:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-16  6:16 Unexpected kernel BRK exception at EL1 - Internal error: BRK handler: f20003e8 - gic_dist_config Naresh Kamboju
2022-05-16  7:08 ` Marc Zyngier
2022-05-16 13:58   ` Naresh Kamboju
2022-05-16 14:37     ` Naresh Kamboju
2022-05-16 14:48     ` Marc Zyngier [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k0al5y92.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=lkft-triage@lists.linaro.org \
    --cc=mingo@kernel.org \
    --cc=naresh.kamboju@linaro.org \
    --cc=pali@kernel.org \
    --cc=sfr@canb.auug.org.au \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox