From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 09/10] arm64/BUG: Use BRK instruction for generic BUG traps
Date: Wed, 17 Jun 2015 17:42:28 +0100 [thread overview]
Message-ID: <20150617164228.GA31594@arm.com> (raw)
In-Reply-To: <20150617113518.GE3651@e103592.cambridge.arm.com>
Hi Dave,
On Wed, Jun 17, 2015 at 12:35:18PM +0100, Dave P Martin wrote:
> On Tue, Jun 16, 2015 at 03:48:10PM +0100, Will Deacon wrote:
> > On Thu, Jun 11, 2015 at 04:29:23PM +0100, Dave P Martin wrote:
> > > diff --git a/arch/arm64/include/asm/brk.h b/arch/arm64/include/asm/brk.h
> > > index 99b8dfb..f4d5894 100644
> > > --- a/arch/arm64/include/asm/brk.h
> > > +++ b/arch/arm64/include/asm/brk.h
> > > @@ -27,5 +27,6 @@
> > > #define FAULT_BRK_IMM 0x100
> > > #define KGDB_DYN_DBG_BRK_IMM 0x400
> > > #define KGDB_COMPILED_DBG_BRK_IMM 0x401
> > > +#define BUG_BRK_IMM 0x7ff
> >
> > Just curious, but how did you come up with this number?
>
> There's a comment in debug-monitors.h that the "allowed values for
> kgbd" (sic) are 0x400..0x7ff.
>
> So 0x7ff seemed unlikely to clash with any other use, and well
> out of the way of the values that kgbd currently uses.
>
> It's debatable that the BUG value shouldn't be in the range at all.
> However, BUG_BRK_IMM is a contract between the kernel and itself for
> EL1 only, so it can be changed at any time in the future with minimal
> impact.
>
> What's your view?
I wonder if that kgdb range is inclusive? Maybe best to use 0x800 to be
sure.
> > Could we define is_valid_bugaddr as a macro in the header file and avoid
> > the potential out-of-line call?
>
> We could, but it would require a change to <linux/bug.h>. Since
> this is slowpath anyway, I wasn't sure it was worth it.
>
> Happy to add that and try to push it as part of this series if
> you like -- let me know.
Nah, it's fine. I hadn't spotted the declaration.
Will
next prev parent reply other threads:[~2015-06-17 16:42 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-11 15:29 [PATCH 00/10] arm64: Use BRK instruction for generic BUG traps Dave Martin
2015-06-11 15:29 ` [PATCH 01/10] arm64/debug: Eliminate magic number for size of BRK instruction Dave Martin
2015-06-11 15:29 ` [PATCH 02/10] arm64/debug: Mask off all reserved bits from generated ESR values Dave Martin
2015-06-11 15:29 ` [PATCH 03/10] arm64: esr.h type fixes and cleanup Dave Martin
2015-06-11 15:29 ` [PATCH 04/10] arm64/debug: Eliminate magic number from ESR template definition Dave Martin
2015-06-11 15:29 ` [PATCH 05/10] arm64/debug: More consistent naming for the BRK ESR template macro Dave Martin
2015-06-11 15:29 ` [PATCH 06/10] arm64/debug: Move BRK ESR template macro into <asm/esr.h> Dave Martin
2015-06-11 15:29 ` [PATCH 07/10] arm64/debug: Simplify BRK insn opcode declarations Dave Martin
2015-06-11 15:29 ` [PATCH 08/10] arm64/debug: Move BRK types to a separate header Dave Martin
2015-06-11 15:29 ` [PATCH 09/10] arm64/BUG: Use BRK instruction for generic BUG traps Dave Martin
2015-06-16 14:48 ` Will Deacon
2015-06-17 11:35 ` Dave Martin
2015-06-17 16:42 ` Will Deacon [this message]
2015-06-11 15:29 ` [PATCH 10/10] arm64/BUG: Show explicit backtrace for WARNs Dave Martin
2015-06-16 14:49 ` Will Deacon
2015-06-17 11:13 ` Dave Martin
2015-06-16 14:51 ` [PATCH 00/10] arm64: Use BRK instruction for generic BUG traps Will Deacon
2015-06-16 16:51 ` Dave Martin
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=20150617164228.GA31594@arm.com \
--to=will.deacon@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.