From patchwork Fri Sep 18 13:24:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 11785093 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 45899618 for ; Fri, 18 Sep 2020 13:25:10 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 05B4D20872 for ; Fri, 18 Sep 2020 13:25:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 05B4D20872 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arndb.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 68D71900005; Fri, 18 Sep 2020 09:25:02 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 640BA900004; Fri, 18 Sep 2020 09:25:02 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 46F91900006; Fri, 18 Sep 2020 09:25:02 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0234.hostedemail.com [216.40.44.234]) by kanga.kvack.org (Postfix) with ESMTP id 29CF1900005 for ; Fri, 18 Sep 2020 09:25:02 -0400 (EDT) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id C79628249980 for ; Fri, 18 Sep 2020 13:25:01 +0000 (UTC) X-FDA: 77276252802.20.stamp34_2610a382712b Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin20.hostedemail.com (Postfix) with ESMTP id 1C302180C0609 for ; Fri, 18 Sep 2020 13:25:01 +0000 (UTC) X-Spam-Summary: 1,0,0,3781ea4f5e955809,d41d8cd98f00b204,arnd@arndb.de,,RULES_HIT:41:334:355:368:369:379:541:800:960:968:973:988:989:1260:1311:1314:1345:1359:1431:1437:1515:1534:1541:1711:1730:1747:1777:1792:2393:2553:2559:2562:3138:3139:3140:3141:3142:3352:3865:3866:3867:3868:3870:3871:3872:3874:4321:5007:6261:10004:11026:11473:11657:11658:11914:12043:12048:12160:12296:12297:12438:12555:12895:13069:13161:13229:13311:13357:13894:14181:14384:14394:14721:21080:21212:21451:21627:21966:30029:30054:30070:30089:30090,0,RBL:212.227.126.131:@arndb.de:.lbl8.mailshell.net-66.201.201.201 62.8.6.100;04yftz53hqp8cqbp3wgtjrti3wekgycetxdp3spcxk985c43jfszmyit8bg6gzj.w8n5picm3fzh1e5h7uy4ndcbrf7qgk9nhbumsdb6dtm37eaxi33mhkfwmffhx3i.s-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:26,LUA_SUMMARY:none X-HE-Tag: stamp34_2610a382712b X-Filterd-Recvd-Size: 4029 Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.131]) by imf19.hostedemail.com (Postfix) with ESMTP for ; Fri, 18 Sep 2020 13:25:00 +0000 (UTC) Received: from threadripper.lan ([149.172.98.151]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.129]) with ESMTPA (Nemesis) id 1MbC5g-1kuX4n2mK0-00bcmg; Fri, 18 Sep 2020 15:24:53 +0200 From: Arnd Bergmann To: Christoph Hellwig , Alexander Viro , Eric Biederman , Andrew Morton Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arch@vger.kernel.org, linux-mm@kvack.org, kexec@lists.infradead.org, Arnd Bergmann Subject: [PATCH 1/4] x86: add __X32_COND_SYSCALL() macro Date: Fri, 18 Sep 2020 15:24:36 +0200 Message-Id: <20200918132439.1475479-2-arnd@arndb.de> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200918132439.1475479-1-arnd@arndb.de> References: <20200918132439.1475479-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:YLB1Wku+uI0QYaSVbIU1rhwVZJ1zWa6Cu2ogMBGddA2kPGDffCO jG3htzBFq0C6TjASadbyF/2hpq28FzthYWwfMrWieZOMY2geD7uj5WI49eJGdNoAx2B1kCY n1h7WSvGhAbxUmuSs4zJzetfcvLm2trJQ3M1EaUvIHa4mAvw4wTFN6k3MMGj9ClVYQkwNrB OZ7BT5PlJbvq8DBE4b1sQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:IJPklbJZCUI=:jx9D1LRgLXmfjvqKbWS7Hn uEhEs8itMQPJB9RFbdhVEjSueeLctG3mfSCsxn/H9tMmIbexWMaVctJVC6k+SHeXxH3NVjADe BNzv37Frm+/QEk/mM3ye/Lc6nbjylCY2AoXDPCRNj3K1Gkdp6RzM7lQXBRx5DmKmhsdCn3Av3 RhrknkF6SyaMDvzv9YaEwP2X3HMzx1qOgrKONxEes1JLxolY2t/Ovo7mCePIcA4nIkjYBJRFi zV1aNkpW0UR2OYQges8ADGPzrxVLiCYs2VJXW+i4zkCrHUlps7Aga0luIZhvC0EuKdBhOqgqY SRjlUl130DilSxWc36HZIjfMbvBoOr7AP2VtX9UGfZy7Q/3d//MCVJdcLVtLzhBHMBBCK/pxT b9oRJXoTjfFixzpPRn9+XuhxwVmy5HqChKsAKHKM8Ko/K+C4xI2SircsujKjYY/WTZNKiWSmn pGKOgt9XnmL4zCgYojIawSJp6WS0vn9JPaBPljuhXT7g4QQaWzXttIWfiDb9rRva8PJquSjXq drNMp3gQgL+CSZRElW8tLSpG1po+xJ96O3cjOQe0L8qU77JzlKUgqSbDrSY+4wcwwnp+neleX FvHEwnIfBvirSdZK4s82Q4MNDOGqLMP2vLH0M8Bf+xlL3eEGtEqjeR7rPaP4jDUaDA+P9svtS mL7KJgkds0O/ic4DL46WTzDXSldhyN+VfHvYQxWrAqB3ud7/zVJ3X/E4TISyK5t7U4NPXCF/H 4SnidnLPA5k9qGnC6NjfNMC3I6wEE3tP+jO+c8jsZ9WTTQ5ROx8CsRdJN0xjTr8PPekEfL+/U /mMwAlj8qnwg3TrzzZcju1TPrbsLGw7I7i7TuDaULP7F4eu2UbKPuayrR9OnpBCA4D1K9dx X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: sys_move_pages() is an optional syscall, and once we remove the compat version of it in favor of the native one with an in_compat_syscall() check, the x32 syscall table refers to a __x32_sys_move_pages symbol that may not exist when the syscall is disabled. Change the COND_SYSCALL() definition on x86 to also include the redirection for x32. Signed-off-by: Arnd Bergmann --- arch/x86/include/asm/syscall_wrapper.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/x86/include/asm/syscall_wrapper.h b/arch/x86/include/asm/syscall_wrapper.h index a84333adeef2..5eacd35a7f97 100644 --- a/arch/x86/include/asm/syscall_wrapper.h +++ b/arch/x86/include/asm/syscall_wrapper.h @@ -171,12 +171,16 @@ extern long __ia32_sys_ni_syscall(const struct pt_regs *regs); __SYS_STUBx(x32, compat_sys##name, \ SC_X86_64_REGS_TO_ARGS(x, __VA_ARGS__)) +#define __X32_COND_SYSCALL(name) \ + __COND_SYSCALL(x32, sys_##name) + #define __X32_COMPAT_COND_SYSCALL(name) \ __COND_SYSCALL(x32, compat_sys_##name) #define __X32_COMPAT_SYS_NI(name) \ __SYS_NI(x32, compat_sys_##name) #else /* CONFIG_X86_X32 */ +#define __X32_COND_SYSCALL(name) #define __X32_COMPAT_SYS_STUB0(name) #define __X32_COMPAT_SYS_STUBx(x, name, ...) #define __X32_COMPAT_COND_SYSCALL(name) @@ -253,6 +257,7 @@ extern long __ia32_sys_ni_syscall(const struct pt_regs *regs); static long __do_sys_##sname(const struct pt_regs *__unused) #define COND_SYSCALL(name) \ + __X32_COND_SYSCALL(name) \ __X64_COND_SYSCALL(name) \ __IA32_COND_SYSCALL(name)