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: 11785119 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 B39C76CB for ; Fri, 18 Sep 2020 13:25:58 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6C184207FB for ; Fri, 18 Sep 2020 13:25:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="v0qUpYb1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6C184207FB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arndb.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Y3vWflWrPrw1Q02PdqYf0Qyfcx9mGWbI7qUKz2CYL2k=; b=v0qUpYb1SRhfhsPIlBaVN+vuS jOxTQ+GqH/rusaYaRGSDm5A+WyHeGtHVt/1omWgZpjem8RhMqNuIWBNmr1YiWVSz9IgPHb471dv7n Ktd5/Qw01URCMJvTXN/PW822uW/PUnHT7cu5Dd4kfL0eTWaK986m55kb9IeeMoGvYdeitrGNTPNhz UgY+zFBNeBrEZA1ENqaTb9KZoBsRJSagmyrXRzrTyVfE8r9aTSqAbm81NdIfFbh7jdEOJydok+WwX P0zG7SEsrUfWji+zufKFZulc/JSsAGxU7cUmOF2bLLVtMUKuhKNLYuoMGyVHsUF+wHT/6JEBaOsSO NGrnemd2Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJGOU-0007sl-MI; Fri, 18 Sep 2020 13:25:42 +0000 Received: from mout.kundenserver.de ([212.227.126.131]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJGOB-0007l1-Eo; Fri, 18 Sep 2020 13:25:26 +0000 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 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200918_092523_733713_471C9632 X-CRM114-Status: GOOD ( 14.08 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [212.227.126.131 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [212.227.126.131 listed in list.dnswl.org] 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch@vger.kernel.org, Arnd Bergmann , kexec@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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)