Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1337783 > unrolled thread

[PATCH 3/8] arm64: add copy_to/from_user to kprobes blacklist

Started byDavid Long <dave.long@linaro.org>
First post2016-02-19 00:50 +0100
Last post2016-02-19 00:50 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 3/8] arm64: add copy_to/from_user to kprobes blacklist David Long <dave.long@linaro.org> - 2016-02-19 00:50 +0100

#1337783 — [PATCH 3/8] arm64: add copy_to/from_user to kprobes blacklist

FromDavid Long <dave.long@linaro.org>
Date2016-02-19 00:50 +0100
Subject[PATCH 3/8] arm64: add copy_to/from_user to kprobes blacklist
Message-ID<r3GuB-4Gv-1@gated-at.bofh.it>
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

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web