Skip to content

arm64: kprobes: Fix bugs in kprobes for arm64

Masami Hiramatsu (Google) linux-arm-kernel lkml 2 versions – Applied

Status from this message: Applied to arm64 (for-next/kprobes), thanks!

Get series with b4
b4 am 166994750386.439920.1754385804350980158.stgit@devnote3

Versions newest first · linked by author and title

  1. v2 Latest3 patches 5 repliesApplied
  2. v13 patches 7 repliesSuperseded

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/3arm64: Prohibit instrumentation on arch_stack_walk()arch/arm64/kernel/stacktrace.c+5 -54 replies
2/3arm64: kprobes: Let arch do_page_fault() fix up page fault in user handlerarch/arm64/kernel/probes/kprobes.c+0 -80 replies
3/3arm64: kprobes: Return DBG_HOOK_ERROR if kprobes can not handle a BRKarch/arm64/kernel/probes/kprobes.c+36 -420 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchMark Rutland
1/3A-b
2/3A-b
3/3A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/3] arm64: kprobes: Fix bugs in kprobes for arm64

Hi,

Here is the 2nd version of the kprobe bugfixes on arm64. The previous series is here;

https://lore.kernel.org/all/166990553243.253128.13594802750635478633.stgit@devnote3/T/#u

The first one is a critical issue, which will cause a kernel crach easily with lockdep[1/3]. Others are minor issues and rare cases. The [2/3] let do_page_fault() fixup the page fault in kprobes user handler, and [3/3] is more like code cleanup and returns DBG_HOOK_ERROR if it can not handle kprobe's BRK (but that should not happen.)

In this version I update to use noinstr and __always_inline [1/3] and update comments[3/3]. Also add Mark's Ack (Thanks!)

Thank you,

---

Masami Hiramatsu (Google) (3):
arm64: Prohibit instrumentation on arch_stack_walk()
arm64: kprobes: Let arch do_page_fault() fix up page fault in user handler
arm64: kprobes: Return DBG_HOOK_ERROR if kprobes can not handle a BRK

 arch/arm64/kernel/probes/kprobes.c |   86 +++++++++++++++---------------------
 arch/arm64/kernel/stacktrace.c     |   10 ++--
 2 files changed, 41 insertions(+), 55 deletions(-)

--
Masami Hiramatsu (Google) <[email protected]>