Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp579017pxp; Fri, 11 Mar 2022 10:01:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJxQKOyxyWkmH86s43KL08VNdwUhDWkMHEAOiPDRGzsjm3tOyQCCijtKttqO+GpiagWJo1PR X-Received: by 2002:a17:907:94cb:b0:6da:97ec:3231 with SMTP id dn11-20020a17090794cb00b006da97ec3231mr9699562ejc.438.1647021660463; Fri, 11 Mar 2022 10:01:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1647021660; cv=none; d=google.com; s=arc-20160816; b=ofGp9C3Z4Y+Md5XL7tcJFZmX4e6jFGgSGMdW6u1ZGSNtEHKD3pG7TGaWMcKXul9Jz+ KnskL0upqQ0HyI0oHrw8MjpZhxcDtZl7MOe0VdkOEhku2vJ3aLlIJjnkdA4Sngozxl8Z Jsb1QGzoQ1zurKbbp6c2/slF1GBV3Gg1mKsaoXW2DdMyyquLP7oZ+aQxnOhfe+eEN3JH NgE55Q05w+4vnQEahUl4+9EIdEo04PSrsbIbjifwUXlQoBlWkeRyEUZGp2YvKqhGOSjX pNAlQbd9GS3s+I1WRWLpQNkMeHHN8Idwt8f67kc5RP33cFlPHPLzJXPLxdezEEEZkx/d qegw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=rUiYo8eCRxTwiY5ZfSUY9DG+VhkBTNUvEtWsMSNXIqs=; b=lvuxjcNC5aPDiv33JiQ5VSpfy0dOVE8kX8SeyqhuNwx4/UPYyL2FHm1TahorPqNxcQ TQfAz5Z4gdfnHvF/lqMl/Xni9E0V750GqwG5zIpREuUHOR+3RYMaycbrjhVTxAVD50A5 ZcK0CQdBc12lOjX9lJZt2HFeXgTCLbj3lGExVdgy2LjMk+XGf/c6o3BCXpT0n33ZqYSh Kzej9Dtz28TwNRo37k8+cUxAsFyj+tD8xMVCGHY29RWxsKcP+b/bvG92ddR0A5ZQY+wO VPF8i8cnOI2jz3LiAnHDaLEk9FMWShx883KZTsl49pTlO5z35T18hCKwCStCFs+1n/zX iGXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=hwTMYIL2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nb23-20020a1709071c9700b006d83d8b066esi6271994ejc.327.2022.03.11.10.00.33; Fri, 11 Mar 2022 10:01:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=hwTMYIL2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243532AbiCJOXB (ORCPT + 99 others); Thu, 10 Mar 2022 09:23:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244256AbiCJOTE (ORCPT ); Thu, 10 Mar 2022 09:19:04 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2AC1A1704D0; Thu, 10 Mar 2022 06:15:52 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 024F261C67; Thu, 10 Mar 2022 14:15:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DD90BC36AF5; Thu, 10 Mar 2022 14:15:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1646921751; bh=TulCEYJwDG+ZNjCzCFBRTe+9gAE+iWf3pD+bnXcqBTc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hwTMYIL2V+H90wccEOYxrBMcRZnGxlIHaFzL0vKJ7FzQqic4IW2ROFFIC0UCtZVRN jJe+qvSAFDNSMgj2c3dqIGEMVz6KCjjllM15RKatXC0KjmWwj2sCT+tR88VJDqlXhG +/rgiKT5JTBZvS8TCHYvsAI/YhgAzWALxwG8n+hI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, WANG Chao , Borislav Petkov , Zhenzhong Duan , Masahiro Yamada , "H. Peter Anvin" , Andi Kleen , Andrew Morton , Andy Lutomirski , Arnd Bergmann , Daniel Borkmann , David Woodhouse , Geert Uytterhoeven , Jessica Yu , Jiri Kosina , Kees Cook , Konrad Rzeszutek Wilk , Luc Van Oostenryck , Michal Marek , Miguel Ojeda , Peter Zijlstra , Tim Chen , Vasily Gorbik , linux-kbuild@vger.kernel.org, srinivas.eeda@oracle.com, x86-ml , Ben Hutchings Subject: [PATCH 4.9 28/38] x86, modpost: Replace last remnants of RETPOLINE with CONFIG_RETPOLINE Date: Thu, 10 Mar 2022 15:13:41 +0100 Message-Id: <20220310140808.958165558@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220310140808.136149678@linuxfoundation.org> References: <20220310140808.136149678@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: WANG Chao commit e4f358916d528d479c3c12bd2fd03f2d5a576380 upstream. 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 [bwh: Backported to 4.9: adjust context] Signed-off-by: Ben Hutchings Signed-off-by: Greg Kroah-Hartman --- 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(-) --- a/arch/x86/kernel/cpu/bugs.c +++ b/arch/x86/kernel/cpu/bugs.c @@ -586,7 +586,7 @@ static enum spectre_v2_user_mitigation s static enum spectre_v2_user_mitigation spectre_v2_user_ibpb __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) --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h @@ -107,7 +107,7 @@ #define __weak __attribute__((weak)) #define __alias(symbol) __attribute__((alias(#symbol))) -#ifdef RETPOLINE +#ifdef CONFIG_RETPOLINE #define __noretpoline __attribute__((indirect_branch("keep"))) #endif --- a/include/linux/module.h +++ b/include/linux/module.h @@ -791,7 +791,7 @@ static inline void module_bug_finalize(c 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) --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -2147,7 +2147,7 @@ static void add_intree_flag(struct buffe /* 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"); }