Thread (38 messages) 38 messages, 7 authors, 2016-04-20

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

From: 平松雅巳 / HIRAMATU,MASAMI <hidden>
Date: 2016-03-17 12:04:37
Also in: lkml

From: "David A. Long" <redacted>

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 <redacted>
Looks good to me.

Reviewed-by: Masami Hiramatsu <redacted>

Thanks,
quoted hunk ↗ jump to hunk
---
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


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help