Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

um: Fix the declaration of kasan_map_memory

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>

authored by

Tiwei Bie and committed by
Richard Weinberger
6a85e34c 3144013e

+3 -1
-1
arch/um/include/asm/kasan.h
··· 24 24 25 25 #ifdef CONFIG_KASAN 26 26 void kasan_init(void); 27 - void kasan_map_memory(void *start, unsigned long len); 28 27 extern int kasan_um_is_ready; 29 28 30 29 #ifdef CONFIG_STATIC_LINK
+2
arch/um/include/shared/kern_util.h
··· 67 67 68 68 void um_idle_sleep(void); 69 69 70 + void kasan_map_memory(void *start, size_t len); 71 + 70 72 #endif
+1
arch/um/os-Linux/mem.c
··· 15 15 #include <sys/vfs.h> 16 16 #include <linux/magic.h> 17 17 #include <init.h> 18 + #include <kern_util.h> 18 19 #include <os.h> 19 20 20 21 /*