um: Fix the declaration of kasan_map_memory
authorTiwei Bie <tiwei.btw@antgroup.com>
Tue, 23 Apr 2024 12:58:55 +0000 (20:58 +0800)
committerRichard Weinberger <richard@nod.at>
Tue, 30 Apr 2024 12:15:42 +0000 (14:15 +0200)
Make it match its definition (size_t vs unsigned long). And declare
it in a shared header to fix the -Wmissing-prototypes warning, as it
is defined in the user code and called in the kernel code.

Fixes: 5b301409e8bc ("UML: add support for KASAN under x86_64")
Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
arch/um/include/asm/kasan.h
arch/um/include/shared/kern_util.h
arch/um/os-Linux/mem.c

index 0d6547f4ec85c4d279e3375a79ec545227c9e218..f97bb1f7b8514ae8c8109e9685ef9da2cd0289df 100644 (file)
@@ -24,7 +24,6 @@
 
 #ifdef CONFIG_KASAN
 void kasan_init(void);
-void kasan_map_memory(void *start, unsigned long len);
 extern int kasan_um_is_ready;
 
 #ifdef CONFIG_STATIC_LINK
index 81bc38a2e3fcf4d222ef0c37b9da50c94f4e4956..95521b1f5b20d44faffc3e2edf35e9226584f25a 100644 (file)
@@ -67,4 +67,6 @@ extern void fatal_sigsegv(void) __attribute__ ((noreturn));
 
 void um_idle_sleep(void);
 
+void kasan_map_memory(void *start, size_t len);
+
 #endif
index 8530b2e086049b0e72fb19304a712e9594623730..c6c9495b14321201f26e57e2362c14b02557ee8c 100644 (file)
@@ -15,6 +15,7 @@
 #include <sys/vfs.h>
 #include <linux/magic.h>
 #include <init.h>
+#include <kern_util.h>
 #include <os.h>
 
 /*