[PATCH mm] arm64: kasan: fix MTE symbols exports
Andrey Konovalov
andreyknvl at google.com
Tue Feb 9 10:32:30 EST 2021
Only export MTE symbols when KASAN-KUnit tests are enabled.
Signed-off-by: Andrey Konovalov <andreyknvl at google.com>
---
Andrew, please squash this into:
"arm64: kasan: export MTE symbols for KASAN tests"
---
arch/arm64/kernel/mte.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm64/kernel/mte.c b/arch/arm64/kernel/mte.c
index a66c2806fc4d..788ef0c3a25e 100644
--- a/arch/arm64/kernel/mte.c
+++ b/arch/arm64/kernel/mte.c
@@ -113,13 +113,17 @@ void mte_enable_kernel(void)
sysreg_clear_set(sctlr_el1, SCTLR_ELx_TCF_MASK, SCTLR_ELx_TCF_SYNC);
isb();
}
+#if IS_ENABLED(CONFIG_KASAN_KUNIT_TEST)
EXPORT_SYMBOL_GPL(mte_enable_kernel);
+#endif
void mte_set_report_once(bool state)
{
WRITE_ONCE(report_fault_once, state);
}
+#if IS_ENABLED(CONFIG_KASAN_KUNIT_TEST)
EXPORT_SYMBOL_GPL(mte_set_report_once);
+#endif
bool mte_report_once(void)
{
--
2.30.0.478.g8a0d178c01-goog
More information about the linux-arm-kernel
mailing list