From: Will Deacon <will@kernel.org>
To: Douglas Anderson <dianders@chromium.org>
Cc: Mark Rutland <mark.rutland@arm.com>,
catalin.marinas@arm.com, bjorn.andersson@linaro.org,
hpa@zytor.com, frowand.list@gmail.com,
daniel.thompson@linaro.org, corbet@lwn.net,
jinho lim <jordan.lim@samsung.com>,
agross@kernel.org, linux-arm-kernel@lists.infradead.org,
linux-serial@vger.kernel.org,
kgdb-bugreport@lists.sourceforge.net,
Dave Martin <Dave.Martin@arm.com>,
Masami Hiramatsu <mhiramat@kernel.org>,
jslaby@suse.com, Alexios Zavras <alexios.zavras@intel.com>,
bp@alien8.de, tglx@linutronix.de, mingo@redhat.com,
Allison Randal <allison@lohutok.net>,
sumit.garg@linaro.org, gregkh@linuxfoundation.org,
linux-kernel@vger.kernel.org, James Morse <james.morse@arm.com>,
"Eric W. Biederman" <ebiederm@xmission.com>,
jason.wessel@windriver.com
Subject: Re: [PATCH v3 05/11] arm64: Add call_break_hook() to early_brk64() for early kgdb
Date: Mon, 11 May 2020 15:59:09 +0100 [thread overview]
Message-ID: <20200511145908.GA22040@willie-the-truck> (raw)
In-Reply-To: <20200428141218.v3.5.I22067ad43e77ddfd4b64c2d49030628480f9e8d9@changeid>
Hi Doug,
On Tue, Apr 28, 2020 at 02:13:45PM -0700, Douglas Anderson wrote:
> diff --git a/arch/arm64/kernel/debug-monitors.c b/arch/arm64/kernel/debug-monitors.c
> index 48222a4760c2..59c353dfc8e9 100644
> --- a/arch/arm64/kernel/debug-monitors.c
> +++ b/arch/arm64/kernel/debug-monitors.c
> @@ -297,7 +297,7 @@ void unregister_kernel_break_hook(struct break_hook *hook)
> unregister_debug_hook(&hook->node);
> }
>
> -static int call_break_hook(struct pt_regs *regs, unsigned int esr)
> +int call_break_hook(struct pt_regs *regs, unsigned int esr)
> {
> struct break_hook *hook;
> struct list_head *list;
> diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c
> index cf402be5c573..a8173f0c1774 100644
> --- a/arch/arm64/kernel/traps.c
> +++ b/arch/arm64/kernel/traps.c
> @@ -1044,6 +1044,9 @@ int __init early_brk64(unsigned long addr, unsigned int esr,
> if ((comment & ~KASAN_BRK_MASK) == KASAN_BRK_IMM)
> return kasan_handler(regs, esr) != DBG_HOOK_HANDLED;
> #endif
> + if (call_break_hook(regs, esr) == DBG_HOOK_HANDLED)
> + return 0;
I think this just means we're not running debug_traps_init() early enough,
and actually the KASAN early handler is unnecessary too.
If we call debug_traps_init() directly from setup_arch() and drop the
arch_initcall(), can we then drop early_brk64 entirely?
Will
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-05-11 14:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-28 21:13 [PATCH v3 00/11] kgdb: Support late serial drivers; enable early debug w/ boot consoles Douglas Anderson
2020-04-28 21:13 ` [PATCH v3 05/11] arm64: Add call_break_hook() to early_brk64() for early kgdb Douglas Anderson
2020-05-11 14:59 ` Will Deacon [this message]
2020-05-11 22:45 ` Doug Anderson
2020-05-12 7:35 ` Will Deacon
2020-05-12 15:27 ` Doug Anderson
2020-05-13 6:17 ` Will Deacon
2020-05-13 23:08 ` Doug Anderson
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=20200511145908.GA22040@willie-the-truck \
--to=will@kernel.org \
--cc=Dave.Martin@arm.com \
--cc=agross@kernel.org \
--cc=alexios.zavras@intel.com \
--cc=allison@lohutok.net \
--cc=bjorn.andersson@linaro.org \
--cc=bp@alien8.de \
--cc=catalin.marinas@arm.com \
--cc=corbet@lwn.net \
--cc=daniel.thompson@linaro.org \
--cc=dianders@chromium.org \
--cc=ebiederm@xmission.com \
--cc=frowand.list@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=hpa@zytor.com \
--cc=james.morse@arm.com \
--cc=jason.wessel@windriver.com \
--cc=jordan.lim@samsung.com \
--cc=jslaby@suse.com \
--cc=kgdb-bugreport@lists.sourceforge.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mhiramat@kernel.org \
--cc=mingo@redhat.com \
--cc=sumit.garg@linaro.org \
--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