[PATCH] KJH: test: clobber regs

From: Kevin Hilman
Date: Fri May 09 2014 - 16:37:43 EST


---
arch/arm64/kernel/entry.S | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)

diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S
index 520da4c02ece..232f0200e88d 100644
--- a/arch/arm64/kernel/entry.S
+++ b/arch/arm64/kernel/entry.S
@@ -36,6 +36,25 @@
.macro ct_user_exit, restore = 0
#ifdef CONFIG_CONTEXT_TRACKING
bl context_tracking_user_exit
+ movz x0, #0xff, lsl #48
+ movz x1, #0xff, lsl #48
+ movz x2, #0xff, lsl #48
+ movz x3, #0xff, lsl #48
+ movz x4, #0xff, lsl #48
+ movz x5, #0xff, lsl #48
+ movz x6, #0xff, lsl #48
+ movz x7, #0xff, lsl #48
+ movz x8, #0xff, lsl #48
+ movz x9, #0xff, lsl #48
+ movz x10, #0xff, lsl #48
+ movz x11, #0xff, lsl #48
+ movz x12, #0xff, lsl #48
+ movz x13, #0xff, lsl #48
+ movz x14, #0xff, lsl #48
+ movz x15, #0xff, lsl #48
+ movz x16, #0xff, lsl #48
+ movz x17, #0xff, lsl #48
+ movz x18, #0xff, lsl #48
.if \restore == 1
/*
* Save/restore needed during syscalls. Restore syscall arguments from
@@ -60,6 +79,25 @@
push x0, x1
.endif
bl context_tracking_user_enter
+ movz x0, #0xff, lsl #48
+ movz x1, #0xff, lsl #48
+ movz x2, #0xff, lsl #48
+ movz x3, #0xff, lsl #48
+ movz x4, #0xff, lsl #48
+ movz x5, #0xff, lsl #48
+ movz x6, #0xff, lsl #48
+ movz x7, #0xff, lsl #48
+ movz x8, #0xff, lsl #48
+ movz x9, #0xff, lsl #48
+ movz x10, #0xff, lsl #48
+ movz x11, #0xff, lsl #48
+ movz x12, #0xff, lsl #48
+ movz x13, #0xff, lsl #48
+ movz x14, #0xff, lsl #48
+ movz x15, #0xff, lsl #48
+ movz x16, #0xff, lsl #48
+ movz x17, #0xff, lsl #48
+ movz x18, #0xff, lsl #48
.if \save == 1
pop x0, x1
pop x2, x3
--
1.9.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/