From: David Long <dave.long@linaro.org>
To: Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will.deacon@arm.com>,
Sandeepa Prabhu <sandeepa.s.prabhu@gmail.com>,
William Cohen <wcohen@redhat.com>,
Pratyush Anand <panand@redhat.com>,
Steve Capper <steve.capper@linaro.org>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Cc: "Dave P Martin" <Dave.Martin@arm.com>,
"Mark Rutland" <mark.rutland@arm.com>,
"Marc Zyngier" <marc.zyngier@arm.com>,
"Robin Murphy" <Robin.Murphy@arm.com>,
"Ard Biesheuvel" <ard.biesheuvel@linaro.org>,
"Jens Wiklander" <jens.wiklander@linaro.org>,
"Christoffer Dall" <christoffer.dall@linaro.org>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Yang Shi" <yang.shi@linaro.org>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Viresh Kumar" <viresh.kumar@linaro.org>,
"Suzuki K. Poulose" <suzuki.poulose@arm.com>,
"Kees Cook" <keescook@chromium.org>,
"Zi Shen Lim" <zlim.lnx@gmail.com>,
"John Blackwood" <john.blackwood@ccur.com>,
"Feng Kan" <fkan@apm.com>,
"Balamurugan Shanmugam" <bshanmugam@apm.com>,
"James Morse" <james.morse@arm.com>,
"Vladimir Murzin" <Vladimir.Murzin@arm.com>,
"Mark Salyzyn" <salyzyn@android.com>,
"Petr Mladek" <pmladek@suse.com>,
"Andrew Morton" <akpm@linux-foundation.org>,
"Mark Brown" <broonie@kernel.org>
Subject: [PATCH 3/8] arm64: add copy_to/from_user to kprobes blacklist
Date: Thu, 18 Feb 2016 18:48:16 -0500 [thread overview]
Message-ID: <1455839301-26464-4-git-send-email-dave.long@linaro.org> (raw)
In-Reply-To: <1455839301-26464-1-git-send-email-dave.long@linaro.org>
From: "David A. Long" <dave.long@linaro.org>
Currrently taking exceptions when accessing user data from a kprobe'd
instruction doesn't work. Avoid this situation by blacklisting the relevant
functions.
Signed-off-by: David A. Long <dave.long@linaro.org>
---
arch/arm64/lib/copy_from_user.S | 1 +
arch/arm64/lib/copy_to_user.S | 1 +
2 files changed, 2 insertions(+)
diff --git a/arch/arm64/lib/copy_from_user.S b/arch/arm64/lib/copy_from_user.S
index 4699cd7..0ac2131 100644
--- a/arch/arm64/lib/copy_from_user.S
+++ b/arch/arm64/lib/copy_from_user.S
@@ -66,6 +66,7 @@
.endm
end .req x5
+ .section .kprobes.text,"ax",%progbits
ENTRY(__copy_from_user)
ALTERNATIVE("nop", __stringify(SET_PSTATE_PAN(0)), ARM64_HAS_PAN, \
CONFIG_ARM64_PAN)
diff --git a/arch/arm64/lib/copy_to_user.S b/arch/arm64/lib/copy_to_user.S
index 7512bbb..e4eb84c 100644
--- a/arch/arm64/lib/copy_to_user.S
+++ b/arch/arm64/lib/copy_to_user.S
@@ -65,6 +65,7 @@
.endm
end .req x5
+ .section .kprobes.text,"ax",%progbits
ENTRY(__copy_to_user)
ALTERNATIVE("nop", __stringify(SET_PSTATE_PAN(0)), ARM64_HAS_PAN, \
CONFIG_ARM64_PAN)
--
2.5.0
next prev parent reply other threads:[~2016-02-18 23:48 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-18 23:48 [PATCH 0/8] arm64: Add kernel probes (kprobes) support David Long
2016-02-18 23:48 ` [PATCH 1/8] arm64: Add HAVE_REGS_AND_STACK_ACCESS_API feature David Long
2016-02-18 23:48 ` [PATCH 2/8] arm64: Add more test functions to insn.c David Long
2016-02-18 23:48 ` David Long [this message]
2016-02-18 23:48 ` [PATCH 4/8] arm64: Kprobes with single stepping support David Long
2016-02-18 23:48 ` [PATCH 5/8] arm64: kprobes instruction simulation support David Long
2016-02-19 14:04 ` Marc Zyngier
2016-02-24 6:56 ` David Long
2016-02-24 9:05 ` Marc Zyngier
2016-02-24 15:07 ` David Long
2016-02-24 15:21 ` Marc Zyngier
2016-03-01 2:55 ` David Long
2016-02-18 23:48 ` [PATCH 6/8] arm64: Add trampoline code for kretprobes David Long
2016-02-18 23:48 ` [PATCH 7/8] arm64: Add kernel return probes support (kretprobes) David Long
2016-02-18 23:48 ` [PATCH 8/8] kprobes: Add arm64 case in kprobe example module David Long
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=1455839301-26464-4-git-send-email-dave.long@linaro.org \
--to=dave.long@linaro.org \
--cc=Dave.Martin@arm.com \
--cc=Robin.Murphy@arm.com \
--cc=Vladimir.Murzin@arm.com \
--cc=akpm@linux-foundation.org \
--cc=alex.bennee@linaro.org \
--cc=ard.biesheuvel@linaro.org \
--cc=broonie@kernel.org \
--cc=bshanmugam@apm.com \
--cc=catalin.marinas@arm.com \
--cc=christoffer.dall@linaro.org \
--cc=fkan@apm.com \
--cc=gregkh@linuxfoundation.org \
--cc=james.morse@arm.com \
--cc=jens.wiklander@linaro.org \
--cc=john.blackwood@ccur.com \
--cc=keescook@chromium.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--cc=mark.rutland@arm.com \
--cc=panand@redhat.com \
--cc=pmladek@suse.com \
--cc=salyzyn@android.com \
--cc=sandeepa.s.prabhu@gmail.com \
--cc=steve.capper@linaro.org \
--cc=suzuki.poulose@arm.com \
--cc=viresh.kumar@linaro.org \
--cc=wcohen@redhat.com \
--cc=will.deacon@arm.com \
--cc=yang.shi@linaro.org \
--cc=zlim.lnx@gmail.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).