diff mbox series

[v2,12/12] arm64: kasan: export MTE symbols for KASAN tests

Message ID 068ab897dc5e73d4a8d7c919b84339216c2f99da.1612538932.git.andreyknvl@google.com (mailing list archive)
State New, archived
Headers show
Series kasan: optimizations and fixes for HW_TAGS | expand

Commit Message

Andrey Konovalov Feb. 5, 2021, 3:39 p.m. UTC
Export mte_enable_kernel_sync() and mte_set_report_once() to fix:

ERROR: modpost: "mte_enable_kernel_sync" [lib/test_kasan.ko] undefined!
ERROR: modpost: "mte_set_report_once" [lib/test_kasan.ko] undefined!

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
---
 arch/arm64/kernel/mte.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Christoph Hellwig Feb. 8, 2021, 5:42 p.m. UTC | #1
On Fri, Feb 05, 2021 at 04:39:13PM +0100, Andrey Konovalov wrote:
> Export mte_enable_kernel_sync() and mte_set_report_once() to fix:
> 
> ERROR: modpost: "mte_enable_kernel_sync" [lib/test_kasan.ko] undefined!
> ERROR: modpost: "mte_set_report_once" [lib/test_kasan.ko] undefined!

Please put this under an ifdef for the testing option that pull the
symbols in.
Andrey Konovalov Feb. 9, 2021, 3:18 p.m. UTC | #2
On Mon, Feb 8, 2021 at 6:42 PM Christoph Hellwig <hch@infradead.org> wrote:
>
> On Fri, Feb 05, 2021 at 04:39:13PM +0100, Andrey Konovalov wrote:
> > Export mte_enable_kernel_sync() and mte_set_report_once() to fix:
> >
> > ERROR: modpost: "mte_enable_kernel_sync" [lib/test_kasan.ko] undefined!
> > ERROR: modpost: "mte_set_report_once" [lib/test_kasan.ko] undefined!
>
> Please put this under an ifdef for the testing option that pull the
> symbols in.

Sure. I'll send this change as a fix-up patch instead of resending the
whole series.

Thanks!
diff mbox series

Patch

diff --git a/arch/arm64/kernel/mte.c b/arch/arm64/kernel/mte.c
index 8b27b70e1aac..fc753fb77940 100644
--- a/arch/arm64/kernel/mte.c
+++ b/arch/arm64/kernel/mte.c
@@ -120,6 +120,7 @@  void mte_enable_kernel_sync(void)
 {
 	__mte_enable_kernel("synchronous", SCTLR_ELx_TCF_SYNC);
 }
+EXPORT_SYMBOL_GPL(mte_enable_kernel_sync);
 
 void mte_enable_kernel_async(void)
 {
@@ -130,6 +131,7 @@  void mte_set_report_once(bool state)
 {
 	WRITE_ONCE(report_fault_once, state);
 }
+EXPORT_SYMBOL_GPL(mte_set_report_once);
 
 bool mte_report_once(void)
 {