Skip to content

Commit 934ed90

Browse files
author
Rafael Aquini
committed
um: Fix the declaration of kasan_map_memory
JIRA: https://issues.redhat.com/browse/RHEL-84184 This patch is a backport of the following upstream commit: commit 6a85e34 Author: Tiwei Bie <tiwei.btw@antgroup.com> Date: Tue Apr 23 20:58:55 2024 +0800 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 <tiwei.btw@antgroup.com> Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Rafael Aquini <raquini@redhat.com>
1 parent df1e81c commit 934ed90

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
@@ -69,4 +69,6 @@ extern void fatal_sigsegv(void) __attribute__ ((noreturn));
6969

7070
void um_idle_sleep(void);
7171

72+
void kasan_map_memory(void *start, size_t len);
73+
7274
#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)