Skip to content

Commit 6a85e34

Browse files
btw616richardweinberger
authored andcommitted
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: 5b30140 ("UML: add support for KASAN under x86_64") Signed-off-by: Tiwei Bie <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
1 parent 3144013 commit 6a85e34

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

arch/um/include/asm/kasan.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424

2525
#ifdef CONFIG_KASAN
2626
void kasan_init(void);
27-
void kasan_map_memory(void *start, unsigned long len);
2827
extern int kasan_um_is_ready;
2928

3029
#ifdef CONFIG_STATIC_LINK

arch/um/include/shared/kern_util.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,6 @@ extern void fatal_sigsegv(void) __attribute__ ((noreturn));
6767

6868
void um_idle_sleep(void);
6969

70+
void kasan_map_memory(void *start, size_t len);
71+
7072
#endif

arch/um/os-Linux/mem.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <sys/vfs.h>
1616
#include <linux/magic.h>
1717
#include <init.h>
18+
#include <kern_util.h>
1819
#include <os.h>
1920

2021
/*

0 commit comments

Comments
 (0)