Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1915460ybb; Sat, 21 Mar 2020 08:31:58 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuTyBzpf+HOvw1YLXkB+QKFEsqLk39vKLchZJHmtHYAw3UrC5mJXf6+/vKCUEJFt9f874p/ X-Received: by 2002:aca:3857:: with SMTP id f84mr10398853oia.150.1584804718644; Sat, 21 Mar 2020 08:31:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584804718; cv=none; d=google.com; s=arc-20160816; b=iIl6A1pDNWihDUm9Sz6H1cOETblgmQgNA8GeoTt7ezSY0xL+KjjY6VVnw+hgvhQtPP nczosbNRD+goT5PMfCObnuvmNK4eBwe5KQzkqrbha/Jk4K+x2Qwc/wQ2Yw/yi8bw0fIE lQCliQUashskEny2H2V4d50WB3iPa7z6uYn0sYz5M+pIWXsOerpw2r8Hx+VSfugi4uXb CJyuDAPlSzwzk8RhD1vBZqzHXMw0EoUTTO5uOVDrrWzbYEl/3jAipqgRvTyhU8vcQEjb MmkiiDo1kgbkiFVpw6zqbRm7ezWhufSbpXT27DaArJDDF9X8lBF8OVBY+GBa55+qAdQt OelQ== 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=umBY9urHkSkmqklqknFn174Pkq0zPpedPSa13nONwsA=; b=rGvGD4by+ugGfRqj1Rnehag/IX7GDidW+nx51j1y5UXOxH78vnCXkWXNrVx3OCmvPo Ziad0QW1oZUpRU8bs7y9a4Pdilt90aLNPqujqi2tuXcPYzsWzEuAJmhBREfPNQFU8/+W J5eEv2wfT0k8lswlQBdNLTWTuyeWpafQIuWnCCxDU2yWNODFc+/ACkhNWkqT7UfHaRwY UPdl+sRWFWsZNcXBfGX911TSR/L30JRjpgZGxx3Xw0qpkh8tJkU6J3ZJ81ZZ8t09Bfgy gjlDrhbtnMhyJtBnj52WpkHvlnSjnBCw10G9SNE+5aHSKnOq3/4TI5DUNv0Ps3mtanOG qQCQ== 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 n190si4773939oig.207.2020.03.21.08.31.46; Sat, 21 Mar 2020 08:31:58 -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 S1727757AbgCUPaq (ORCPT + 99 others); Sat, 21 Mar 2020 11:30:46 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:38919 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727497AbgCUPal (ORCPT ); Sat, 21 Mar 2020 11:30:41 -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 1jFg59-00051Y-7C; Sat, 21 Mar 2020 16:30:39 +0100 Received: from [127.0.1.1] (localhost [IPv6:::1]) by tip-bot2.lab.linutronix.de (Postfix) with ESMTP id 156FB1C22E4; Sat, 21 Mar 2020 16:30:37 +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: Move sys_ni_syscall stub to common.c Cc: Brian Gerst , Thomas Gleixner , x86 , LKML In-Reply-To: <20200313195144.164260-7-brgerst@gmail.com> References: <20200313195144.164260-7-brgerst@gmail.com> MIME-Version: 1.0 Message-ID: <158480463674.28353.6214614962833183223.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: cc42c045af1ff4dee875196f8fe7d6ed1f29ea64 Gitweb: https://git.kernel.org/tip/cc42c045af1ff4dee875196f8fe7d6ed1f29ea64 Author: Brian Gerst AuthorDate: Fri, 13 Mar 2020 15:51:32 -04:00 Committer: Thomas Gleixner CommitterDate: Sat, 21 Mar 2020 16:03:20 +01:00 x86/entry/64: Move sys_ni_syscall stub to common.c so it can be available to multiple syscall tables. Also directly return -ENOSYS instead of bouncing to the generic sys_ni_syscall(). Signed-off-by: Brian Gerst Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20200313195144.164260-7-brgerst@gmail.com --- arch/x86/entry/common.c | 7 +++++++ arch/x86/entry/syscall_64.c | 7 ------- arch/x86/include/asm/syscall_wrapper.h | 3 +++ 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/arch/x86/entry/common.c b/arch/x86/entry/common.c index 9747876..149bf54 100644 --- a/arch/x86/entry/common.c +++ b/arch/x86/entry/common.c @@ -438,3 +438,10 @@ __visible long do_fast_syscall_32(struct pt_regs *regs) #endif } #endif + +#ifdef CONFIG_X86_64 +SYSCALL_DEFINE0(ni_syscall) +{ + return -ENOSYS; +} +#endif diff --git a/arch/x86/entry/syscall_64.c b/arch/x86/entry/syscall_64.c index adf619a..058dc1b 100644 --- a/arch/x86/entry/syscall_64.c +++ b/arch/x86/entry/syscall_64.c @@ -8,13 +8,6 @@ #include #include -extern asmlinkage long sys_ni_syscall(void); - -SYSCALL_DEFINE0(ni_syscall) -{ - return sys_ni_syscall(); -} - #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 diff --git a/arch/x86/include/asm/syscall_wrapper.h b/arch/x86/include/asm/syscall_wrapper.h index 1d96cce..0f126e4 100644 --- a/arch/x86/include/asm/syscall_wrapper.h +++ b/arch/x86/include/asm/syscall_wrapper.h @@ -8,6 +8,9 @@ struct pt_regs; +extern asmlinkage long __x64_sys_ni_syscall(const struct pt_regs *regs); +extern asmlinkage long __ia32_sys_ni_syscall(const struct pt_regs *regs); + /* Mapping of registers to parameters for syscalls on x86-64 and x32 */ #define SC_X86_64_REGS_TO_ARGS(x, ...) \ __MAP(x,__SC_ARGS \