From: Masami Hiramatsu <mhiramat@kernel.org>
To: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
James Morse <james.morse@arm.com>,
linux-arm-kernel@lists.infradead.org,
Will Deacon <will@kernel.org>,
Julien Thierry <julien.thierry.kdev@gmail.com>,
Masami Hiramatsu <mhiramat@kernel.org>
Subject: Re: [PATCH 2/8] arm64: remove __exception annotations
Date: Fri, 4 Oct 2019 23:10:33 +0900 [thread overview]
Message-ID: <20191004231033.537af57806db6316b18cb0b5@kernel.org> (raw)
In-Reply-To: <20191004101717.GB34756@lakrids.cambridge.arm.com>
On Fri, 4 Oct 2019 11:17:17 +0100
Mark Rutland <mark.rutland@arm.com> wrote:
> On Thu, Oct 03, 2019 at 06:16:36PM +0100, James Morse wrote:
> > Since commit 732674980139 ("arm64: unwind: reference pt_regs via embedded
> > stack frame") arm64 has has not used the __exception annotation to dump
> > the pt_regs during stack tracing. in_exception_text() has no callers.
> >
> > This annotation is only used to blacklist kprobes, it means the same as
> > __kprobes.
> >
> > Section annotations like this require the functions to be grouped
> > together between the start/end markers, and placed according to
> > the linker script. For kprobes we also have NOKPROBE_SYMBOL() which
> > logs the symbol address in a section that kprobes parses and
> > blacklists at boot.
> >
> > Using NOKPROBE_SYMBOL() instead lets kprobes publish the list of
> > blacklisted symbols, and saves us from having an arm64 specific
> > spelling of __kprobes.
> >
> > Signed-off-by: James Morse <james.morse@arm.com>
> > Cc: Masami Hiramatsu <mhiramat@kernel.org>
> >
> > ---
> > (__exception_irq_entry means no-kprobes and optionally in a section
> > ftrace can use to pretty-print interrupt handler boundaries.)
> > ---
> > arch/arm64/include/asm/exception.h | 4 ++--
> > arch/arm64/include/asm/traps.h | 10 ---------
> > arch/arm64/kernel/probes/kprobes.c | 4 ----
> > arch/arm64/kernel/traps.c | 10 ++++++---
> > arch/arm64/kernel/vmlinux.lds.S | 3 ---
> > arch/arm64/mm/fault.c | 34 +++++++++++++++---------------
> > 6 files changed, 26 insertions(+), 39 deletions(-)
> >
> > diff --git a/arch/arm64/include/asm/exception.h b/arch/arm64/include/asm/exception.h
> > index a17393ff6677..b0b3ba56e919 100644
> > --- a/arch/arm64/include/asm/exception.h
> > +++ b/arch/arm64/include/asm/exception.h
>
> [...]
>
> > -asmlinkage void __exception do_debug_exception(unsigned long addr_if_watchpoint,
> > - unsigned int esr,
> > - struct pt_regs *regs)
> > +asmlinkage void do_debug_exception(unsigned long addr_if_watchpoint,
> > + unsigned int esr, struct pt_regs *regs)
> > {
> > const struct fault_info *inf = esr_to_debug_fault_info(esr);
> > unsigned long pc = instruction_pointer(regs);
>
> I assume you meant to add NOKPROBE_SYMBOL(do_debug_exception) here.
>
> Assuming so, and with that fixed up:
>
> Acked-by: Mark Rutland <mark.rutland@arm.com>
Good catch, if so, this looks good to me too.
with that fixed up:
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Thanks!
--
Masami Hiramatsu <mhiramat@kernel.org>
_______________________________________________
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:[~2019-10-04 14:10 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-03 17:16 [PATCH 0/8] arm64: Convert entry.S synchronous exception handling to C James Morse
2019-10-03 17:16 ` [PATCH 1/8] arm64: Fix incorrect irqflag restore for priority masking for compat James Morse
2019-10-03 17:16 ` [PATCH 2/8] arm64: remove __exception annotations James Morse
2019-10-04 10:17 ` Mark Rutland
2019-10-04 14:10 ` Masami Hiramatsu [this message]
2019-10-04 16:08 ` James Morse
2019-10-04 16:34 ` Mark Rutland
2019-10-04 13:03 ` Marc Gonzalez
2019-10-04 16:08 ` James Morse
2019-10-03 17:16 ` [PATCH 3/8] arm64: Add prototypes for functions called by entry.S James Morse
2019-10-04 10:22 ` Mark Rutland
2019-10-03 17:16 ` [PATCH 4/8] arm64: add local_daif_inherit() James Morse
2019-10-03 17:16 ` [PATCH 5/8] arm64: entry: convert el1_sync to C James Morse
2019-10-04 10:39 ` Mark Rutland
2019-10-03 17:16 ` [PATCH 6/8] arm64: entry: convert el0_sync " James Morse
2019-10-04 12:57 ` Mark Rutland
2019-10-04 16:09 ` James Morse
2019-10-04 16:37 ` Mark Rutland
2019-10-03 17:16 ` [PATCH 7/8] arm64: Remove asmlinkage from updated functions James Morse
2019-10-04 12:58 ` Mark Rutland
2019-10-03 17:16 ` [PATCH 8/8] arm64: entry-common: don't touch daif before bp-hardening James Morse
2019-10-04 13:31 ` Mark Rutland
2019-10-04 16:09 ` James Morse
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=20191004231033.537af57806db6316b18cb0b5@kernel.org \
--to=mhiramat@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=james.morse@arm.com \
--cc=julien.thierry.kdev@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=will@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).