[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240423112457.2409319-5-tiwei.btw@antgroup.com>
Date: Tue, 23 Apr 2024 19:24:54 +0800
From: "Tiwei Bie" <tiwei.btw@...group.com>
To: richard@....at,
anton.ivanov@...bridgegreys.com,
johannes@...solutions.net
Cc: <linux-um@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>,
"Tiwei Bie" <tiwei.btw@...group.com>
Subject: [PATCH 4/7] 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@...group.com>
---
arch/um/include/asm/kasan.h | 1 -
arch/um/include/shared/kern_util.h | 2 ++
arch/um/os-Linux/mem.c | 1 +
3 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/um/include/asm/kasan.h b/arch/um/include/asm/kasan.h
index 0d6547f4ec85..f97bb1f7b851 100644
--- a/arch/um/include/asm/kasan.h
+++ b/arch/um/include/asm/kasan.h
@@ -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
diff --git a/arch/um/include/shared/kern_util.h b/arch/um/include/shared/kern_util.h
index 81bc38a2e3fc..1fa03499e1dc 100644
--- a/arch/um/include/shared/kern_util.h
+++ b/arch/um/include/shared/kern_util.h
@@ -37,6 +37,8 @@ extern void initial_thread_cb(void (*proc)(void *), void *arg);
extern void timer_handler(int sig, struct siginfo *unused_si, struct uml_pt_regs *regs);
+extern void kasan_map_memory(void *start, size_t len);
+
extern void uml_pm_wake(void);
extern int start_uml(void);
diff --git a/arch/um/os-Linux/mem.c b/arch/um/os-Linux/mem.c
index 8530b2e08604..c6c9495b1432 100644
--- a/arch/um/os-Linux/mem.c
+++ b/arch/um/os-Linux/mem.c
@@ -15,6 +15,7 @@
#include <sys/vfs.h>
#include <linux/magic.h>
#include <init.h>
+#include <kern_util.h>
#include <os.h>
/*
--
2.34.1
Powered by blists - more mailing lists