Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1916722ybb; Sat, 21 Mar 2020 08:33:16 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtCfhHLnALBAIwdQktMHJguYaFkiMI/pE1pNvq9X6gFmNweUH+LOM6oyIPEQPiwSmThYXcL X-Received: by 2002:a9d:ac5:: with SMTP id 63mr11645556otq.239.1584804796115; Sat, 21 Mar 2020 08:33:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584804796; cv=none; d=google.com; s=arc-20160816; b=gxBIMQcMGuteHzfPxYORt+x1mbamj0L4MWTW1YZf/jx/a1H0Ty1jxfdBpWhI6Hf0bk SOmdajLujylph6NjlOj9B2zaJGjf50T0+QY5P06+dJ8Ol/zqKrSI+KEt5wLLQBKFA3Or NlRwTVU7bNwCjIGOywpetsFEfLKXL42zPJJDefHiCpkVtHLIQdyH8FPikN4jXEyCNc9y T7Nps9dWy5K4hpmzTpNvWN27rihsbGvaX7Ld04qv9+RW8AteVogPCt0P+9vMJYzt4xMJ V+Hd99nVhHGe3fVnoLtKkxYFEGBOS3fUNBL1Ru5jHEFVxLEQXst9yV247OaJZYj53JzU 3M7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :robot-unsubscribe:robot-id:message-id:mime-version:references :in-reply-to:cc:subject:to:reply-to:from:date; bh=YizK/i0ifurKPy7nrfuHAor06o5heKQXMsCQyoHZjbw=; b=FcDF4dxfE3370sxhGZ2WqTdv9CQ20dihoi2Ih8aINtDNg6m+XY0S2WMnB0Y41zU+67 Svk2VGAPljqT0ipsNrRpxhyMPhsgmM5LrD+TudefkxEpJx/3HEt8xLXc5vhkc3Us/3dA itkmCjZ+jpj4jIkJOm60b8KPoRZIIXQXzhQGtpDnkMFngZrw+5j3P9F+nk2fvAeTjMTT kh0NEG81ki2s/iDvv+HogB59anz8v5i9RL1tZkLM9lm+IH927NLcn3TDz5jUBEGSXD5q VJUpPIhjvBKdD3iEUK4Gc9cmW4Cbp7kLgfKRWwvyinJ9grRomX3wjE6DoHBTeBKRsApg WlqA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y65si4560799oie.92.2020.03.21.08.33.04; Sat, 21 Mar 2020 08:33:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728025AbgCUPb1 (ORCPT + 99 others); Sat, 21 Mar 2020 11:31:27 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:38907 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727644AbgCUPaj (ORCPT ); Sat, 21 Mar 2020 11:30:39 -0400 Received: from [5.158.153.53] (helo=tip-bot2.lab.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1jFg57-00051A-GR; Sat, 21 Mar 2020 16:30:37 +0100 Received: from [127.0.1.1] (localhost [IPv6:::1]) by tip-bot2.lab.linutronix.de (Postfix) with ESMTP id A56521C22E8; Sat, 21 Mar 2020 16:30:36 +0100 (CET) Date: Sat, 21 Mar 2020 15:30:36 -0000 From: "tip-bot2 for Brian Gerst" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/entry] x86/entry/64: Split X32 syscall table into its own file Cc: Brian Gerst , Thomas Gleixner , Dominik Brodowski , x86 , LKML In-Reply-To: <20200313195144.164260-8-brgerst@gmail.com> References: <20200313195144.164260-8-brgerst@gmail.com> MIME-Version: 1.0 Message-ID: <158480463634.28353.12540165408970276913.tip-bot2@tip-bot2> X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the x86/entry branch of tip: Commit-ID: 2e487c357917b98adc6a6dafa612c435cad1af41 Gitweb: https://git.kernel.org/tip/2e487c357917b98adc6a6dafa612c435cad1af41 Author: Brian Gerst AuthorDate: Fri, 13 Mar 2020 15:51:33 -04:00 Committer: Thomas Gleixner CommitterDate: Sat, 21 Mar 2020 16:03:21 +01:00 x86/entry/64: Split X32 syscall table into its own file Since X32 has its own syscall table now, move it to a separate file. Signed-off-by: Brian Gerst Signed-off-by: Thomas Gleixner Reviewed-by: Dominik Brodowski Link: https://lkml.kernel.org/r/20200313195144.164260-8-brgerst@gmail.com --- arch/x86/entry/Makefile | 1 + arch/x86/entry/syscall_64.c | 27 ++------------------------- arch/x86/entry/syscall_x32.c | 26 ++++++++++++++++++++++++++ 3 files changed, 29 insertions(+), 25 deletions(-) create mode 100644 arch/x86/entry/syscall_x32.c diff --git a/arch/x86/entry/Makefile b/arch/x86/entry/Makefile index 06fc70c..85eb381 100644 --- a/arch/x86/entry/Makefile +++ b/arch/x86/entry/Makefile @@ -14,4 +14,5 @@ obj-y += vdso/ obj-y += vsyscall/ obj-$(CONFIG_IA32_EMULATION) += entry_64_compat.o syscall_32.o +obj-$(CONFIG_X86_X32_ABI) += syscall_x32.o diff --git a/arch/x86/entry/syscall_64.c b/arch/x86/entry/syscall_64.c index 058dc1b..efb85c6 100644 --- a/arch/x86/entry/syscall_64.c +++ b/arch/x86/entry/syscall_64.c @@ -8,14 +8,13 @@ #include #include +#define __SYSCALL_X32(nr, sym, qual) + #define __SYSCALL_64(nr, sym, qual) extern asmlinkage long sym(const struct pt_regs *); -#define __SYSCALL_X32(nr, sym, qual) __SYSCALL_64(nr, sym, qual) #include #undef __SYSCALL_64 -#undef __SYSCALL_X32 #define __SYSCALL_64(nr, sym, qual) [nr] = sym, -#define __SYSCALL_X32(nr, sym, qual) asmlinkage const sys_call_ptr_t sys_call_table[__NR_syscall_max+1] = { /* @@ -25,25 +24,3 @@ asmlinkage const sys_call_ptr_t sys_call_table[__NR_syscall_max+1] = { [0 ... __NR_syscall_max] = &__x64_sys_ni_syscall, #include }; - -#undef __SYSCALL_64 -#undef __SYSCALL_X32 - -#ifdef CONFIG_X86_X32_ABI - -#define __SYSCALL_64(nr, sym, qual) -#define __SYSCALL_X32(nr, sym, qual) [nr] = sym, - -asmlinkage const sys_call_ptr_t x32_sys_call_table[__NR_syscall_x32_max+1] = { - /* - * Smells like a compiler bug -- it doesn't work - * when the & below is removed. - */ - [0 ... __NR_syscall_x32_max] = &__x64_sys_ni_syscall, -#include -}; - -#undef __SYSCALL_64 -#undef __SYSCALL_X32 - -#endif diff --git a/arch/x86/entry/syscall_x32.c b/arch/x86/entry/syscall_x32.c new file mode 100644 index 0000000..d144ced --- /dev/null +++ b/arch/x86/entry/syscall_x32.c @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: GPL-2.0 +/* System call table for x32 ABI. */ + +#include +#include +#include +#include +#include +#include + +#define __SYSCALL_64(nr, sym, qual) + +#define __SYSCALL_X32(nr, sym, qual) extern asmlinkage long sym(const struct pt_regs *); +#include +#undef __SYSCALL_X32 + +#define __SYSCALL_X32(nr, sym, qual) [nr] = sym, + +asmlinkage const sys_call_ptr_t x32_sys_call_table[__NR_syscall_x32_max+1] = { + /* + * Smells like a compiler bug -- it doesn't work + * when the & below is removed. + */ + [0 ... __NR_syscall_x32_max] = &__x64_sys_ni_syscall, +#include +};