linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] arm64: kprobes: Fix some bugs in arm64 kprobes
@ 2019-07-18  5:43 Masami Hiramatsu
  2019-07-18  5:43 ` [PATCH 1/3] arm64: kprobes: Recover pstate.D in single-step exception handler Masami Hiramatsu
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Masami Hiramatsu @ 2019-07-18  5:43 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon
  Cc: mhiramat, linux-arm-kernel, linux-kernel, Naresh Kamboju,
	Dan Rue, Matt Hart, Anders Roxell, Daniel Diaz

Hi,

Here are the patches which fixes kprobe bugs on arm64.

Naresh reported that recently ftracetest crashes kernel, and I found
there are 3 different bugs around the crash.

- Kprobes on arm64 doesn't recover pstate.D mask even if probed
  context masks pstate.D. This causes a real kernel crash if a
  kprobe is nested.
- Some symbols which are called from blacklisted function, are not
  blacklisted.
- Debug exception handlers on arm64 is using rcu_read_lock(). This
  doesn't crashes kernel, but kicks suspicious RCU usage warning if
  we put kprobes on the function which is called in idle context.

This series includes fixes for above bugs.

Thank you,

---

Masami Hiramatsu (3):
      arm64: kprobes: Recover pstate.D in single-step exception handler
      arm64: unwind: Prohibit probing on return_address()
      arm64: debug: Remove rcu_read_lock from debug exception


 arch/arm64/kernel/debug-monitors.c |   14 ++++++++------
 arch/arm64/kernel/probes/kprobes.c |    9 ++++++---
 arch/arm64/kernel/return_address.c |    4 +++-
 arch/arm64/kernel/stacktrace.c     |    3 +++
 4 files changed, 20 insertions(+), 10 deletions(-)

--
Masami Hiramatsu (Linaro) <mhiramat@kernel.org>

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2019-07-24 10:45 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-18  5:43 [PATCH 0/3] arm64: kprobes: Fix some bugs in arm64 kprobes Masami Hiramatsu
2019-07-18  5:43 ` [PATCH 1/3] arm64: kprobes: Recover pstate.D in single-step exception handler Masami Hiramatsu
2019-07-19 10:07   ` James Morse
2019-07-20  6:22     ` Masami Hiramatsu
2019-07-18  5:43 ` [PATCH 2/3] arm64: unwind: Prohibit probing on return_address() Masami Hiramatsu
2019-07-18  5:43 ` [PATCH 3/3] arm64: debug: Remove rcu_read_lock from debug exception Masami Hiramatsu
2019-07-18  6:22   ` Paul E. McKenney
2019-07-18  9:20     ` Mark Rutland
2019-07-18 14:31       ` Masami Hiramatsu
2019-07-19  8:42         ` James Morse
2019-07-20  7:32           ` Masami Hiramatsu
2019-07-21  1:50             ` Masami Hiramatsu
2019-07-19  9:59         ` Mark Rutland
2019-07-20  7:54           ` Masami Hiramatsu
2019-07-24 10:45             ` Mark Rutland

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).