Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp478725imi; Fri, 22 Jul 2022 03:18:08 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vG15A88i+rTGPdboeE5R/92jPPBfKR4W9NFVmdpoIit7b4M0z09U0kpV3s1jijXrunSwB+ X-Received: by 2002:a17:90a:d34a:b0:1f2:3c99:6a20 with SMTP id i10-20020a17090ad34a00b001f23c996a20mr5897460pjx.237.1658485087819; Fri, 22 Jul 2022 03:18:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658485087; cv=none; d=google.com; s=arc-20160816; b=A8yrC2t4Cul4ZOXDxwKRzMl3Dq1JM1VyPg9NqVjJUBZ+rGCnKHIvZgOG7p4D85/xZB wMdT3Sk1xi8EJ+7J/lWDiqRVh+kxdzpRuLbnuKptjOaoBGlnxFKcyHPekSbKkyDT1/4J Z5wlas3cID8IC6E6lSZ997wQtwofUJiksvbe8tArn33wnRZAid8O3zhvjlyUsqj1RdNT nKf9W6Ub/3Aj6pMrQD7Dboma+WxfuiLWYzCuvXseHfgJDj1j16mZTnrz6RsnHJQ1hVW6 w1vOg+Xyv6q/fBiA4t3C03j2ike3CCy7CZZy2cZtJgwueotcHJxFVJEPp4frNmuLD+o7 0oqA== 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=P5gJNSQT8C6WfMx5/AE9Fdm8mzrzyeQIN54ZSNiQO0o=; b=1BMq7T8RrWtEsdAl1w+luARZ4EZw8XdP1P59pIRplSMG8zt6fI3yFgoplSayp0Omu2 eVHgLvh828JH68l9aDT2gA9eqHUQ5arKwU1Qov0mWpRLYsIgqgLUIGGR3AtWNsFCHoo1 /Y3Ox9ZlRepeh1ZLSLTn09HM4wJ1z7acLoYmTu1glZof8btGV1TmyG/0nkN3HLegiwAk tHhbDpWSG6q9dTVTJMv8VPj4UydG1Z/o3boJoEXEeZDSQ9Eub87vrsboGXot0D5+JfIU MuAhXXNy8FiJ6+4kedJ+X0quBtS3WbLyi7R4Noc+pCKjODfeiqIK3u2lP/J7AL2pwq9N 6Qpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ko0vKEno; 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 my10-20020a17090b4c8a00b001ef9a4bbf5csi5254720pjb.173.2022.07.22.03.17.52; Fri, 22 Jul 2022 03:18:07 -0700 (PDT) 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=ko0vKEno; 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 S235083AbiGVJJr (ORCPT + 99 others); Fri, 22 Jul 2022 05:09:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234876AbiGVJJZ (ORCPT ); Fri, 22 Jul 2022 05:09:25 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C888A0257; Fri, 22 Jul 2022 02:08:58 -0700 (PDT) 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 ams.source.kernel.org (Postfix) with ESMTPS id F236DB827BB; Fri, 22 Jul 2022 09:08:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 435C6C341C6; Fri, 22 Jul 2022 09:08:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1658480935; bh=c7cT0pGJvYgrreCApbBPIWLaruKPYpFkqKQ21dEuQZk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ko0vKEno7n5E3CtDWa18SS6UQqbDN9q40bEcvvuKgEzmgg4WrRwmy+MtApjVOvRvV NoBKg9Lbd6XLcq59QuwtkoNepfH3rsAmb3WSqPjcyGICCJFsOdZ+dtRm6fcXbNYWaU j0OK2MuecozemLXlL+AsmMOJqvUKyRxAALZYDLmw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Peter Zijlstra (Intel)" , Borislav Petkov , Josh Poimboeuf , Thadeu Lima de Souza Cascardo Subject: [PATCH 5.18 22/70] objtool: Treat .text.__x86.* as noinstr Date: Fri, 22 Jul 2022 11:07:17 +0200 Message-Id: <20220722090651.964758178@linuxfoundation.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220722090650.665513668@linuxfoundation.org> References: <20220722090650.665513668@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.8 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 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: Peter Zijlstra commit 951ddecf435659553ed15a9214e153a3af43a9a1 upstream. Needed because zen_untrain_ret() will be called from noinstr code. Also makes sense since the thunks MUST NOT contain instrumentation nor be poked with dynamic instrumentation. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Borislav Petkov Reviewed-by: Josh Poimboeuf Signed-off-by: Borislav Petkov Signed-off-by: Thadeu Lima de Souza Cascardo Signed-off-by: Greg Kroah-Hartman --- tools/objtool/check.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -374,7 +374,8 @@ static int decode_instructions(struct ob sec->text = true; if (!strcmp(sec->name, ".noinstr.text") || - !strcmp(sec->name, ".entry.text")) + !strcmp(sec->name, ".entry.text") || + !strncmp(sec->name, ".text.__x86.", 12)) sec->noinstr = true; for (offset = 0; offset < sec->sh.sh_size; offset += insn->len) {