All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland@arm.com>
To: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>, Mark Brown <broonie@kernel.org>,
	Kalesh Singh <kaleshsingh@google.com>,
	Marc Zyngier <maz@kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Sandeepa Prabhu <sandeepa.s.prabhu@gmail.com>
Subject: Re: [PATCH v2 1/3] arm64: Prohibit instrumentation on arch_stack_walk()
Date: Fri, 9 Dec 2022 11:16:34 +0000	[thread overview]
Message-ID: <Y5MZEhIpBYd81lZV@FVFF77S0Q05N> (raw)
In-Reply-To: <20221206094137.389e4c374f4be060af19f33a@kernel.org>

On Tue, Dec 06, 2022 at 09:41:37AM +0900, Masami Hiramatsu wrote:
> On Fri, 2 Dec 2022 13:17:30 +0000
> Mark Rutland <mark.rutland@arm.com> wrote:
> > I had a go at testing this patch, and it fixes the crash with the reproducer
> > above, but there are plenty of other instances in stacktrace.c that lead to the
> > same sort of crash, e.g.
> > 
> > # echo p stackinfo_get_task >> ${TRACEFS}/kprobe_events
> > # echo 1 > ${TRACEFS}/events/kprobes/enable
> 
> Oops, thanks for pointing! Hmm, I thought stackinfo_get_task() is an
> inlined function usually. Maybe we should make it nokprobe_inline.
> But this is just one case. I need to scan all symbols to trace...

FWIW, due to other instrumentation issues I've started doing a larger noinstr
cleanup on arm64 which should address this, as fixing this properly involves
also modifying a bunch of underlying helpers (e.g. preempt_count()).

I can Cc you when sending that out, if you'd like? That'll probably be in the
new year.

Thanks,
Mark.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Mark Rutland <mark.rutland@arm.com>
To: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>, Mark Brown <broonie@kernel.org>,
	Kalesh Singh <kaleshsingh@google.com>,
	Marc Zyngier <maz@kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Sandeepa Prabhu <sandeepa.s.prabhu@gmail.com>
Subject: Re: [PATCH v2 1/3] arm64: Prohibit instrumentation on arch_stack_walk()
Date: Fri, 9 Dec 2022 11:16:34 +0000	[thread overview]
Message-ID: <Y5MZEhIpBYd81lZV@FVFF77S0Q05N> (raw)
In-Reply-To: <20221206094137.389e4c374f4be060af19f33a@kernel.org>

On Tue, Dec 06, 2022 at 09:41:37AM +0900, Masami Hiramatsu wrote:
> On Fri, 2 Dec 2022 13:17:30 +0000
> Mark Rutland <mark.rutland@arm.com> wrote:
> > I had a go at testing this patch, and it fixes the crash with the reproducer
> > above, but there are plenty of other instances in stacktrace.c that lead to the
> > same sort of crash, e.g.
> > 
> > # echo p stackinfo_get_task >> ${TRACEFS}/kprobe_events
> > # echo 1 > ${TRACEFS}/events/kprobes/enable
> 
> Oops, thanks for pointing! Hmm, I thought stackinfo_get_task() is an
> inlined function usually. Maybe we should make it nokprobe_inline.
> But this is just one case. I need to scan all symbols to trace...

FWIW, due to other instrumentation issues I've started doing a larger noinstr
cleanup on arm64 which should address this, as fixing this properly involves
also modifying a bunch of underlying helpers (e.g. preempt_count()).

I can Cc you when sending that out, if you'd like? That'll probably be in the
new year.

Thanks,
Mark.

  reply	other threads:[~2022-12-09 11:17 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-02  2:18 [PATCH v2 0/3] arm64: kprobes: Fix bugs in kprobes for arm64 Masami Hiramatsu (Google)
2022-12-02  2:18 ` Masami Hiramatsu (Google)
2022-12-02  2:18 ` [PATCH v2 1/3] arm64: Prohibit instrumentation on arch_stack_walk() Masami Hiramatsu (Google)
2022-12-02  2:18   ` Masami Hiramatsu (Google)
2022-12-02 13:17   ` Mark Rutland
2022-12-02 13:17     ` Mark Rutland
2022-12-06  0:41     ` Masami Hiramatsu
2022-12-06  0:41       ` Masami Hiramatsu
2022-12-09 11:16       ` Mark Rutland [this message]
2022-12-09 11:16         ` Mark Rutland
2022-12-11  3:30         ` Masami Hiramatsu
2022-12-11  3:30           ` Masami Hiramatsu
2022-12-02  2:18 ` [PATCH v2 2/3] arm64: kprobes: Let arch do_page_fault() fix up page fault in user handler Masami Hiramatsu (Google)
2022-12-02  2:18   ` Masami Hiramatsu (Google)
2022-12-02  2:18 ` [PATCH v2 3/3] arm64: kprobes: Return DBG_HOOK_ERROR if kprobes can not handle a BRK Masami Hiramatsu (Google)
2022-12-02  2:18   ` Masami Hiramatsu (Google)
2022-12-05 15:43 ` [PATCH v2 0/3] arm64: kprobes: Fix bugs in kprobes for arm64 Will Deacon
2022-12-05 15:43   ` Will Deacon

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=Y5MZEhIpBYd81lZV@FVFF77S0Q05N \
    --to=mark.rutland@arm.com \
    --cc=broonie@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=kaleshsingh@google.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=sandeepa.s.prabhu@gmail.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 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.