lkml.org 
[lkml]   [2021]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[PATCH mm] arm64: kasan: fix MTE symbols exports
From
Only export MTE symbols when KASAN-KUnit tests are enabled.

Signed-off-by: Andrey Konovalov <andreyknvl@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
\
 
 \ /
  Last update: 2021-02-09 16:35    [W:0.063 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site