From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from canpmsgout04.his.huawei.com (canpmsgout04.his.huawei.com [113.46.200.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 5838C17B505; Thu, 9 Jul 2026 01:48:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=113.46.200.219 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783561685; cv=none; b=cYqpSmADbEg5wTVBX5InAhqlNf5z/2xjKttpSnowTDM5/oVXZGniq9bF3/cWS5kHsA6AaEHs1DUSG1BNtvrcc/KUGOfGSSNbGdQxVa7r1KRZOY+LSakl4Lb9o7oPeuQ/DelDhhflHUIx/SPXKVUVMaX6a6StllRnd0erqNAvC6o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783561685; c=relaxed/simple; bh=ljYK2vCBZTRsQK0MExHZtAR/zv00DWa1fNYGVFIlMvQ=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=UK1G3ijuqB7JVM+Z9g2Z8VlTFsWm1UOaIpPygp7xJ2W31BJePJPuizvf3MLz+c0uhNipD1H43C6QICvfFOMu7ujIfLGFt9uOuPfEZ3ftGV3Yi1cFrlHg+z3RentIgEFAALbitmR3p1y88J7Skrgxskgerzk4sRv8NfpL6I5WTU0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b=ksHjnD6U; arc=none smtp.client-ip=113.46.200.219 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b="ksHjnD6U" dkim-signature: v=1; a=rsa-sha256; d=huawei.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=lJ2lsOw1A2mFoTW+4rB/gWuEpAa+RS/uQCfSDrk5Vco=; b=ksHjnD6U1596jfDaaEoW3GmT39cferO2kq33vFZ36Yq2mGGCmosfTYbLFn7fMP/UeeYaIntK6 p8XaNfppstNTJ0P0vOKbsKrpKmttUnZgBTyp4Laq98LfqAZZrRNzDaKqN/X7my4nhdn8YPnp+8c AalCZ4kXjnU31eOGZTBybVA= Received: from mail.maildlp.com (unknown [172.19.163.0]) by canpmsgout04.his.huawei.com (SkyGuard) with ESMTPS id 4gwd0M5Hszz1prKZ; Thu, 9 Jul 2026 09:38:43 +0800 (CST) Received: from dggpemf500011.china.huawei.com (unknown [7.185.36.131]) by mail.maildlp.com (Postfix) with ESMTPS id 2BC2D40561; Thu, 9 Jul 2026 09:48:00 +0800 (CST) Received: from [10.67.109.254] (10.67.109.254) by dggpemf500011.china.huawei.com (7.185.36.131) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Thu, 9 Jul 2026 09:47:57 +0800 Message-ID: <19433c47-94b3-46e1-8bd2-1a3f3139fe4e@huawei.com> Date: Thu, 9 Jul 2026 09:47:56 +0800 Precedence: bulk X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [patch 15/18] x86/entry: Make syscall functions static To: Thomas Gleixner , LKML CC: Peter Zijlstra , Michael Ellerman , Shrikanth Hegde , , Kees Cook , Huacai Chen , , Paul Walmsley , Palmer Dabbelt , , Sven Schnelle , , , Mark Rutland , Andy Lutomirski , Oleg Nesterov , Richard Henderson , Russell King , Catalin Marinas , Guo Ren , Geert Uytterhoeven , Thomas Bogendoerfer , Helge Deller , Yoshinori Sato , Richard Weinberger , Chris Zankel , , , , , , , , , Arnd Bergmann , Vineet Gupta , Will Deacon , Brian Cain , Michal Simek , Dinh Nguyen , "David S. Miller" , Andreas Larsson , , , , , , =?UTF-8?Q?Michal_Such=C3=A1nek?= , Jonathan Corbet , References: <20260707181957.433213175@kernel.org> <20260707190254.438361565@kernel.org> From: Jinjie Ruan In-Reply-To: <20260707190254.438361565@kernel.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: kwepems100001.china.huawei.com (7.221.188.238) To dggpemf500011.china.huawei.com (7.185.36.131) On 7/8/2026 3:06 AM, Thomas Gleixner wrote: > They are only used in the respective source files. No point in exposing > them. > > Signed-off-by: Thomas Gleixner > --- > arch/x86/entry/syscall_32.c | 2 +- > arch/x86/entry/syscall_64.c | 10 ++++++---- > arch/x86/include/asm/syscall.h | 8 -------- > 3 files changed, 7 insertions(+), 13 deletions(-) > > --- a/arch/x86/entry/syscall_32.c > +++ b/arch/x86/entry/syscall_32.c > @@ -41,7 +41,7 @@ const sys_call_ptr_t sys_call_table[] = > #endif > > #define __SYSCALL(nr, sym) case nr: return __ia32_##sym(regs); > -long ia32_sys_call(const struct pt_regs *regs, unsigned int nr) > +static noinline long ia32_sys_call(const struct pt_regs *regs, unsigned int nr) > { > switch (nr) { > #include > --- a/arch/x86/entry/syscall_64.c > +++ b/arch/x86/entry/syscall_64.c > @@ -32,7 +32,7 @@ const sys_call_ptr_t sys_call_table[] = > #undef __SYSCALL > > #define __SYSCALL(nr, sym) case nr: return __x64_##sym(regs); > -long x64_sys_call(const struct pt_regs *regs, unsigned int nr) > +static noinline long x64_sys_call(const struct pt_regs *regs, unsigned int nr) > { > switch (nr) { > #include > @@ -40,15 +40,17 @@ long x64_sys_call(const struct pt_regs * > } > } > > -#ifdef CONFIG_X86_X32_ABI > -long x32_sys_call(const struct pt_regs *regs, unsigned int nr) > +static noinline long x32_sys_call(const struct pt_regs *regs, unsigned int nr) > { > +#ifdef CONFIG_X86_X32_ABI > switch (nr) { > #include > default: return __x64_sys_ni_syscall(regs); > } > -} > +#else > + return -ENOSYS; > #endif > +} > > static __always_inline bool do_syscall_x64(struct pt_regs *regs, int nr) > { > --- a/arch/x86/include/asm/syscall.h > +++ b/arch/x86/include/asm/syscall.h > @@ -21,14 +21,6 @@ typedef long (*sys_call_ptr_t)(const str > extern const sys_call_ptr_t sys_call_table[]; > > /* > - * These may not exist, but still put the prototypes in so we > - * can use IS_ENABLED(). > - */ > -extern long ia32_sys_call(const struct pt_regs *, unsigned int nr); > -extern long x32_sys_call(const struct pt_regs *, unsigned int nr); > -extern long x64_sys_call(const struct pt_regs *, unsigned int nr); > - Reviewed-by: Jinjie Ruan > -/* > * Only the low 32 bits of orig_ax are meaningful, so we return int. > * This importantly ignores the high bits on 64-bit, so comparisons > * sign-extend the low 32 bits. >