From: Masami Hiramatsu <mhiramat@kernel.org>
To: Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will.deacon@arm.com>
Cc: mhiramat@kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Naresh Kamboju <naresh.kamboju@linaro.org>,
Dan Rue <dan.rue@linaro.org>, Matt Hart <matthew.hart@linaro.org>,
Anders Roxell <anders.roxell@linaro.org>,
Daniel Diaz <daniel.diaz@linaro.org>
Subject: [PATCH v3 0/4] arm64: kprobes: Fix some bugs in arm64 kprobes
Date: Thu, 25 Jul 2019 17:15:44 +0900 [thread overview]
Message-ID: <156404254387.2020.886452004489353899.stgit@devnote2> (raw)
Hi,
Here are the v3 patches which fixes kprobe bugs on arm64.
In this version I fixed some issues pointed by James and add Reviewed-by
and Acked-bys.
Background:
Naresh reported that recently ftracetest crashes kernel, and I found
there are 3 different bugs around the crash. In v1 thread, we found
one another bug of RCU and debug exception.
- Kprobes on arm64 doesn't recover pstate.D mask after single stepping.
So after hitting kprobes, the debug flag status is changed.
- Some symbols which are called from blacklisted function, are not
blacklisted.
- Debug exception is not visible to RCU, thus rcu_read_lock() cause
a warning inside it.
- Debug exception handlers on arm64 is using rcu_read_lock(), but
that is not needed because interrupts are disabled.
This series includes fixes for above bugs.
Thank you,
---
Masami Hiramatsu (4):
arm64: kprobes: Recover pstate.D in single-step exception handler
arm64: unwind: Prohibit probing on return_address()
arm64: Make debug exception handlers visible from RCU
arm64: Remove unneeded rcu_read_lock from debug handlers
arch/arm64/include/asm/daifflags.h | 2 ++
arch/arm64/kernel/debug-monitors.c | 14 +++++++------
arch/arm64/kernel/probes/kprobes.c | 39 +++++------------------------------
arch/arm64/kernel/return_address.c | 3 +++
arch/arm64/kernel/stacktrace.c | 3 +++
arch/arm64/mm/fault.c | 40 ++++++++++++++++++++++++++++++++++++
6 files changed, 61 insertions(+), 40 deletions(-)
--
Masami Hiramatsu (Linaro) <mhiramat@kernel.org>
next reply other threads:[~2019-07-25 8:15 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-25 8:15 Masami Hiramatsu [this message]
2019-07-25 8:15 ` [PATCH v3 1/4] arm64: kprobes: Recover pstate.D in single-step exception handler Masami Hiramatsu
2019-08-01 12:16 ` Will Deacon
2019-08-01 14:08 ` Masami Hiramatsu
2019-08-01 14:25 ` [PATCH v4] " Masami Hiramatsu
2019-07-25 8:16 ` [PATCH v3 2/4] arm64: unwind: Prohibit probing on return_address() Masami Hiramatsu
2019-07-25 8:16 ` [PATCH v3 3/4] arm64: Make debug exception handlers visible from RCU Masami Hiramatsu
2019-07-31 17:26 ` Will Deacon
2019-08-01 5:32 ` Masami Hiramatsu
2019-08-01 7:37 ` Will Deacon
2019-08-01 14:36 ` [PATCH v4] " Masami Hiramatsu
2019-07-25 8:16 ` [PATCH v3 4/4] arm64: Remove unneeded rcu_read_lock from debug handlers Masami Hiramatsu
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=156404254387.2020.886452004489353899.stgit@devnote2 \
--to=mhiramat@kernel.org \
--cc=anders.roxell@linaro.org \
--cc=catalin.marinas@arm.com \
--cc=dan.rue@linaro.org \
--cc=daniel.diaz@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew.hart@linaro.org \
--cc=naresh.kamboju@linaro.org \
--cc=will.deacon@arm.com \
/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).