Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp546519imu; Wed, 9 Jan 2019 02:12:08 -0800 (PST) X-Google-Smtp-Source: ALg8bN7SZqkCCdbGQYEpkU36XcdCbVqmnivcwG3qq0ovkPANs34SW7kg9NmORLRNumywcQFRajax X-Received: by 2002:a62:5b44:: with SMTP id p65mr5287339pfb.47.1547028728772; Wed, 09 Jan 2019 02:12:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547028728; cv=none; d=google.com; s=arc-20160816; b=djVB2XWj2XOkf/4AYKwGmRWvxxu3NvQGSMVJ29buhOZH0TJsZYv8KSTdAy9SvB+tGn zZZVq/VCqXy7As2t/mt7V4viH4W00pWwpfoP4rIXiNIIYDiUZ4uC9WO0lqF/vr6Akg9n E8QmvzY4fnBiFa8GyElCzfxMnbrRdVgq1LV1ZF9sDCicKMZKH2Q/aydPVYWh+G77Gi6r mKzG+lvaIBRntYk2xOdffReZNbAxLuRH+x+Y1KYNmdAcnvWPc3t0CIrPgwsfUrOfeFfx kXDl3FTyH93JhO6vDODJxVXpXhk44FppjDSHxV4bdu47Rhzul4psJwqdpypfqWFAjgp2 WjVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date; bh=fNgzvQzNpOEdTUAsl3iCC56yYT/HeB8sLkxcnz4nGNE=; b=hepe/aUqfYpuGARzU4RYWx3kwYetjj6YX9fOhJ/a+MinWEmSbUl7/6Zc+guvGD4kVo bkmVb5luBGTf8vNkK/QgP60R2MewKr2uZFYo2kmEm0tuRkIo9XyvsoP5aZ3QRzXQKgqd m0Hk21Rb4IxPgKOrJkonFphDQV9w37sOiJc82N0I4ms0GF9R4NMopFr//RmqAAcIcEPP dtmblbFqZw1tU2ipWPRP3OILwiaYJusvroAir/Hap5sKtnJZLpBXtNKR3szTmBG13CF5 Yl1BeifH/iSr/vPIKHCysDq+tCTCtD6WAmO6vYn1X8NJUWdA4u98Fn6P9hgyXnfn/rHT cwdg== 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 cd2si26379103plb.39.2019.01.09.02.11.52; Wed, 09 Jan 2019 02:12:08 -0800 (PST) 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 S1730030AbfAIKF7 (ORCPT + 99 others); Wed, 9 Jan 2019 05:05:59 -0500 Received: from terminus.zytor.com ([198.137.202.136]:56239 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729148AbfAIKF6 (ORCPT ); Wed, 9 Jan 2019 05:05:58 -0500 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id x09A4Xqi3907465 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 9 Jan 2019 02:04:33 -0800 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id x09A4Tav3907460; Wed, 9 Jan 2019 02:04:29 -0800 Date: Wed, 9 Jan 2019 02:04:29 -0800 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for WANG Chao Message-ID: Cc: keescook@chromium.org, chao.wang@ucloud.cn, jeyu@kernel.org, jkosina@suse.cz, hpa@zytor.com, luc.vanoostenryck@gmail.com, zhenzhong.duan@oracle.com, akpm@linux-foundation.org, michal.lkml@markovi.net, arnd@arndb.de, mingo@kernel.org, miguel.ojeda.sandonis@gmail.com, dwmw@amazon.co.uk, x86@kernel.org, luto@kernel.org, ak@linux.intel.com, yamada.masahiro@socionext.com, tglx@linutronix.de, linux-kernel@vger.kernel.org, gor@linux.ibm.com, bp@suse.de, daniel@iogearbox.net, tim.c.chen@linux.intel.com, stable@vger.kernel.org, peterz@infradead.org, geert@linux-m68k.org, konrad.wilk@oracle.com Reply-To: konrad.wilk@oracle.com, geert@linux-m68k.org, peterz@infradead.org, stable@vger.kernel.org, tim.c.chen@linux.intel.com, daniel@iogearbox.net, bp@suse.de, gor@linux.ibm.com, tglx@linutronix.de, linux-kernel@vger.kernel.org, yamada.masahiro@socionext.com, luto@kernel.org, ak@linux.intel.com, dwmw@amazon.co.uk, x86@kernel.org, miguel.ojeda.sandonis@gmail.com, mingo@kernel.org, arnd@arndb.de, michal.lkml@markovi.net, akpm@linux-foundation.org, zhenzhong.duan@oracle.com, luc.vanoostenryck@gmail.com, hpa@zytor.com, jeyu@kernel.org, jkosina@suse.cz, chao.wang@ucloud.cn, keescook@chromium.org In-Reply-To: <20181210163725.95977-1-chao.wang@ucloud.cn> References: <20181210163725.95977-1-chao.wang@ucloud.cn> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/urgent] x86, modpost: Replace last remnants of RETPOLINE with CONFIG_RETPOLINE Git-Commit-ID: e4f358916d528d479c3c12bd2fd03f2d5a576380 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=1.4 required=5.0 tests=ALL_TRUSTED,BAYES_00, DATE_IN_FUTURE_48_96,FREEMAIL_FORGED_REPLYTO autolearn=no autolearn_force=no version=3.4.2 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: e4f358916d528d479c3c12bd2fd03f2d5a576380 Gitweb: https://git.kernel.org/tip/e4f358916d528d479c3c12bd2fd03f2d5a576380 Author: WANG Chao AuthorDate: Tue, 11 Dec 2018 00:37:25 +0800 Committer: Borislav Petkov CommitDate: Wed, 9 Jan 2019 10:35:56 +0100 x86, modpost: Replace last remnants of RETPOLINE with CONFIG_RETPOLINE Commit 4cd24de3a098 ("x86/retpoline: Make CONFIG_RETPOLINE depend on compiler support") replaced the RETPOLINE define with CONFIG_RETPOLINE checks. Remove the remaining pieces. [ bp: Massage commit message. ] Fixes: 4cd24de3a098 ("x86/retpoline: Make CONFIG_RETPOLINE depend on compiler support") Signed-off-by: WANG Chao Signed-off-by: Borislav Petkov Reviewed-by: Zhenzhong Duan Reviewed-by: Masahiro Yamada Cc: "H. Peter Anvin" Cc: Andi Kleen Cc: Andrew Morton Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Daniel Borkmann Cc: David Woodhouse Cc: Geert Uytterhoeven Cc: Jessica Yu Cc: Jiri Kosina Cc: Kees Cook Cc: Konrad Rzeszutek Wilk Cc: Luc Van Oostenryck Cc: Michal Marek Cc: Miguel Ojeda Cc: Peter Zijlstra Cc: Tim Chen Cc: Vasily Gorbik Cc: linux-kbuild@vger.kernel.org Cc: srinivas.eeda@oracle.com Cc: stable Cc: x86-ml Link: https://lkml.kernel.org/r/20181210163725.95977-1-chao.wang@ucloud.cn --- arch/x86/kernel/cpu/bugs.c | 2 +- include/linux/compiler-gcc.h | 2 +- include/linux/module.h | 2 +- scripts/mod/modpost.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c index 8654b8b0c848..1de0f4170178 100644 --- a/arch/x86/kernel/cpu/bugs.c +++ b/arch/x86/kernel/cpu/bugs.c @@ -215,7 +215,7 @@ static enum spectre_v2_mitigation spectre_v2_enabled __ro_after_init = static enum spectre_v2_user_mitigation spectre_v2_user __ro_after_init = SPECTRE_V2_USER_NONE; -#ifdef RETPOLINE +#ifdef CONFIG_RETPOLINE static bool spectre_v2_bad_module; bool retpoline_module_ok(bool has_retpoline) diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index 5776da43da97..dd8268f5f5f0 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h @@ -68,7 +68,7 @@ */ #define uninitialized_var(x) x = x -#ifdef RETPOLINE +#ifdef CONFIG_RETPOLINE #define __noretpoline __attribute__((__indirect_branch__("keep"))) #endif diff --git a/include/linux/module.h b/include/linux/module.h index 9a21fe3509af..8fa38d3e7538 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -828,7 +828,7 @@ static inline void module_bug_finalize(const Elf_Ehdr *hdr, static inline void module_bug_cleanup(struct module *mod) {} #endif /* CONFIG_GENERIC_BUG */ -#ifdef RETPOLINE +#ifdef CONFIG_RETPOLINE extern bool retpoline_module_ok(bool has_retpoline); #else static inline bool retpoline_module_ok(bool has_retpoline) diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 0de2fb236640..26bf886bd168 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -2185,7 +2185,7 @@ static void add_intree_flag(struct buffer *b, int is_intree) /* Cannot check for assembler */ static void add_retpoline(struct buffer *b) { - buf_printf(b, "\n#ifdef RETPOLINE\n"); + buf_printf(b, "\n#ifdef CONFIG_RETPOLINE\n"); buf_printf(b, "MODULE_INFO(retpoline, \"Y\");\n"); buf_printf(b, "#endif\n"); }