diff options
author | Christoph Muellner <christoph.muellner@theobroma-systems.com> | 2018-05-15 23:44:01 +0200 |
---|---|---|
committer | Christoph Muellner <christoph.muellner@theobroma-systems.com> | 2018-05-23 13:01:04 +0200 |
commit | 12f147b2c3f736d51316faad6a4a739ffa77cb90 (patch) | |
tree | 273ff6489aed7788508edea0a39a9461ee98584a /arch | |
parent | 2c78207c47daaaa3a05f1f5fef9927140d56f0c0 (diff) |
[NOUPSTREAM] Verification helper for retpoline enablement.
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm64/kernel/cpu_errata.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm64/kernel/cpu_errata.c b/arch/arm64/kernel/cpu_errata.c index 14ad3a45b601..3f46b5415018 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(const struct arm64_cpu_capabilities *entry) { spectre_v2_enabled = retp_compiler() ? SPECTRE_V2_RETPOLINE_GENERIC : SPECTRE_V2_RETPOLINE_MINIMAL; + + printk("Enabling retpoline!\n"); } #endif |