summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Muellner <christoph.muellner@theobroma-systems.com>2018-05-29 18:11:45 +0200
committerChristoph Muellner <christoph.muellner@theobroma-systems.com>2018-05-29 18:12:28 +0200
commitea43f24ead76d4259c290780ea65ee8a6c7da200 (patch)
tree1f13d9bdd02b063a0495608e54c472db1389b113
parent82496fcaf250cd4f56609db644af8a32372eebb6 (diff)
[NOUPSTREAM] Verification helper for retpoline enablement.v4.16.12-amp
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
-rw-r--r--arch/arm64/kernel/cpu_errata.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm64/kernel/cpu_errata.c b/arch/arm64/kernel/cpu_errata.c
index 4eb57ddf72ca..c2906c2b281d 100644
--- a/arch/arm64/kernel/cpu_errata.c
+++ b/arch/arm64/kernel/cpu_errata.c
@@ -287,6 +287,19 @@ ssize_t cpu_show_spectre_v2(struct device *dev,
struct device_attribute *attr,
char *buf)
{
+#if 1
+ /* Do not upstream! */
+ /* nop has binary representation d503201f */
+ uint32_t *ptr;
+ size_t i;
+ extern void __aarch64_indirect_thunk_x0(void);
+
+ ptr = (uint32_t*)&__aarch64_indirect_thunk_x0;
+ for (i=0; i<9; i++) {
+ printk("%p: 0x%x\n", ptr, *ptr);
+ ptr++;
+ }
+#endif
return sprintf(buf, "%s%s\n", spectre_v2_strings[spectre_v2_enabled],
spectre_v2_module_string());
}
@@ -298,6 +311,8 @@ enable_retpoline(void *data)
{
spectre_v2_enabled = retp_compiler() ? SPECTRE_V2_RETPOLINE_GENERIC :
SPECTRE_V2_RETPOLINE_MINIMAL;
+
+ printk("Enabling retpoline!\n");
return 0;
}