Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp1366683imi; Sat, 23 Jul 2022 03:49:41 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tfU1MSKxv03xI0V0YboIJ0BBBrRlyQFq8fLE0nWPLWC1fqPhQI0xtqL2pWcycKvDqwbvee X-Received: by 2002:a17:90a:b114:b0:1ef:7d95:347 with SMTP id z20-20020a17090ab11400b001ef7d950347mr22746669pjq.137.1658573380844; Sat, 23 Jul 2022 03:49:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658573380; cv=none; d=google.com; s=arc-20160816; b=DoWpaPE/MBqMxvJf/dd4my1n9JJulDuMXw8cC0nfwNQvPZ/le9tujEGIJ1ASoW2YA4 JLEsojMDpC1ccyeT3u5HcUefPlTzGDKOT8UdkikOAMk5FQDbQUFbqjFhVQFroQjfg2oE HPyJdcvlURvMO3HvjXp7/+b3/Zao/956d4/UNvpgDWIRyciIdhlRo6mztWdUZBXT/ZYx 5EOlpFSlOr7O2LrzWHn+y7EfmtlctL0oRhYxvd3YSo8desC9CJU+pwi/Ty4701HN/eAl QZgMOmkJvZeRHkiGpiZvNQrUXHV2+o5lvtcvBKMvtMOv89NWMjuqn0Om1nxkc0iAyiNZ Vgmg== 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=wY/v56P1V75pBheezZdsM1YHHWTuMELDN1HahY9ePlc=; b=joK8t0U223/bFr+vslB5I0npHoWBKJTgv4GPYMYcUEJkxq6X/03UebYajBXMplzI/I 3MWQ+x+t2kPeJCtpH9HBRSFs1xkm7EigU0kKicy8ZXjF8UBOH3xNqi8n1zfkxTm1czhM /wJ5SgZOmV7YHYG8DimTLgHxL58uhs1OncY0Mx1xhD9Tn8YsOiKHQolLX7rF0wLJTBhz 0znsuf2pzQwj1qkKHKwP4soyJlRR8jrRZWWJnyMTrtEo4w1vnt+0NZU0ORqStUNp/ydE HKRn5qiOClWtD7hDA/f0m4bTHnBsA2fN3MiO1ECAH6IFQwqCF+nH4GWJDGphal+ljpvo ecbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1vv5QUko; 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 o11-20020a056a0015cb00b005251e17bcb2si9789033pfu.254.2022.07.23.03.49.25; Sat, 23 Jul 2022 03:49:40 -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=1vv5QUko; 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 S238631AbiGWKHA (ORCPT + 99 others); Sat, 23 Jul 2022 06:07:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238430AbiGWKGg (ORCPT ); Sat, 23 Jul 2022 06:06:36 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A496BE9CC; Sat, 23 Jul 2022 03:01:00 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 8DCB9611BF; Sat, 23 Jul 2022 10:00:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 982B2C341C0; Sat, 23 Jul 2022 10:00:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1658570459; bh=oAN6Q4dQiIIJu3yvwAyYImnSQUKBxZrz7e4pEBocnjg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1vv5QUkoDaMtURlGC8rSwUr9mlNQd2F4RcpkDJVee6gohyzjZtF4iHg9cmeTASUfH e7N7bUjxQPxp/8wuYXYUf3gRUiEHMnucK4kb9PrZLSTz/msJKaOKazfcDp9rm9DQis F1cRLg9vSMIXPWXxLUMSE13ilCSGH4ps53YOhiHc= 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 , Ben Hutchings Subject: [PATCH 5.10 094/148] objtool: Treat .text.__x86.* as noinstr Date: Sat, 23 Jul 2022 11:55:06 +0200 Message-Id: <20220723095250.747563428@linuxfoundation.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220723095224.302504400@linuxfoundation.org> References: <20220723095224.302504400@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: Ben Hutchings 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 @@ -366,7 +366,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->len; offset += insn->len) {