From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out0-219.mail.aliyun.com (out0-219.mail.aliyun.com [140.205.0.219]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D875C7E58E for ; Tue, 23 Apr 2024 11:25:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=140.205.0.219 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713871524; cv=none; b=QtnNTievPHxZub/n0CRnR6+l9/psI3MfrHKnf9lRaMwdDpnv7mtRaAN16IctAW2DAEI42I9zVudy9dyCbo11yPkhxr1jyrNGX6DDcxOKfMFliQhu/LAM4m16p0AtTii8jz+FIx//tphn8QTl7OW0WYpxks6E755lHCtjLsoUGog= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713871524; c=relaxed/simple; bh=SBZ9bhy3FV5JlAyo/guuEZUQmwfsj3LdJnvdET7lW0Y=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Agin9Wb9TYav/TyckYv3oACGBFVQXZ3L0P14WzIZk1/PSxkFv2tUGfYhXNMe5p2cEHr4xfrlX17JaGSFN8eOSCQHxVQRQX2YC2AgVeH+oHDxLb/yVfHr0qOJ+ogy+vuOWAHl/6k1KvQYcPoIxIwqQRAuLecsIgm7Mfc/WvqtQEk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=antgroup.com; spf=pass smtp.mailfrom=antgroup.com; dkim=pass (1024-bit key) header.d=antgroup.com header.i=@antgroup.com header.b=qH5dWtNX; arc=none smtp.client-ip=140.205.0.219 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=antgroup.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=antgroup.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=antgroup.com header.i=@antgroup.com header.b="qH5dWtNX" DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=antgroup.com; s=default; t=1713871513; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=N+epOjrcnscwevX+BkIMhVfG4/FidOuIEx8jyTdVre0=; b=qH5dWtNXtIiZ2tMCdMMsDisYaQ+nySGoXph66XctWWmL1f+tO9X/OFD7MWtR2M8sq1d1p5lyXlZC8q3bBkeNYorz5NCZ+/fk+Sz/RIm5fDqEtcCT8OuOAVpuVJdkgDh+UdYdKkBiqBGaMagPNmSbCQ4tA+A3oMtl0NdNu0/0zac= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R981e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018047190;MF=tiwei.btw@antgroup.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---.XJTUYhx_1713871513; Received: from ubuntu..(mailfrom:tiwei.btw@antgroup.com fp:SMTPD_---.XJTUYhx_1713871513) by smtp.aliyun-inc.com; Tue, 23 Apr 2024 19:25:13 +0800 From: "Tiwei Bie" To: richard@nod.at, anton.ivanov@cambridgegreys.com, johannes@sipsolutions.net Cc: , , "Tiwei Bie" Subject: [PATCH 4/7] um: Fix the declaration of kasan_map_memory Date: Tue, 23 Apr 2024 19:24:54 +0800 Message-Id: <20240423112457.2409319-5-tiwei.btw@antgroup.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240423112457.2409319-1-tiwei.btw@antgroup.com> References: <20240423112457.2409319-1-tiwei.btw@antgroup.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- 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 #include #include +#include #include /* -- 2.34.1