Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4695225imw; Tue, 12 Jul 2022 12:35:41 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v6mfEppTgqao1wHZ5x0O4+qsNIw4muCTcClebkd6yBeVY31yh7e+epeMDRhrCPRRXBXxEG X-Received: by 2002:a17:906:d550:b0:726:2b34:2fd6 with SMTP id cr16-20020a170906d55000b007262b342fd6mr25306446ejc.311.1657654540920; Tue, 12 Jul 2022 12:35:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657654540; cv=none; d=google.com; s=arc-20160816; b=WqNbL7UBVOwkcqDR32/21p2GRK3/guZsjitooIRgWUlyeWL3PEyt1Ixqzh/40gWSSR DBlKBkNZ2mdwGoMQdIJPhJTP1SB/ZNrtjqJ4GzPvJhFEIFo4WYez1gUvjZWR1oUKvy9F +KPynAfmYsg/HzsegVfOi/dGjcFvE54CTSI4xMa9LctAO4GjK7tbXh+i6VR+yOA5lCu7 J7j5Tawq3UZhorJQvZ1mnQW4ELe4FUF1WL5RcEGkFLYihKoJ17cXuNdL0riCPbtHS9em oL3Fw9PNZeCPtBOl2UHZ+1Yv6s96k8+Z7UUMLJ23+znqnjUdDyEwnlfIASBA/rL+G+QQ lYhg== 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=NsSpRtWhTzTNrNkdLTZ1hShDK/POgNDnKr6XuuA/8IHn9p/Q8dJR4HJWfDyaEiBO4S gjpzHf16ZNTBtWhJ+GkplckeTkNpXtwKH+Zi7HJIjeQ/LYTBWVXPqxWZjhTSqSOHezsx 5m4A9xOIUN/m3oHrQ6cDKdE/eJptfX5QQf9sBWcgQTfJSSe6a53QP8EPwK1qFwNU6/Vp M5JOgP77ad5X2VOq5TQInsICjqhTZomz05jRgfShxLLA0DJhqZOsxb5jUcLWJjSQGSwu jNC3IdtHWIzuVvJNIWxfRZ/QrcG2OumxqVOd6KUBlEUg+aB4dfAuBE3KVWVu4vbeCZb/ qQMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=U19wlPar; 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 yr13-20020a170907334d00b00726b8b2949fsi13373417ejb.698.2022.07.12.12.35.15; Tue, 12 Jul 2022 12:35: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=U19wlPar; 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 S232752AbiGLTKs (ORCPT + 99 others); Tue, 12 Jul 2022 15:10:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41844 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235681AbiGLTIw (ORCPT ); Tue, 12 Jul 2022 15:08:52 -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 57F4AFD537; Tue, 12 Jul 2022 11:51:59 -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 B576FB81BBC; Tue, 12 Jul 2022 18:51:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 19369C3411C; Tue, 12 Jul 2022 18:51:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1657651916; bh=c7cT0pGJvYgrreCApbBPIWLaruKPYpFkqKQ21dEuQZk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U19wlParvmSKrHdqJA48UsKe91RpdWpPnTkXgFEtCDIJ5vBIiDVhF3/WObfouTs6b voH1LsmJjzxzpF4B8UzbilAfJ4qwAlTipZn9wJYkAnQZfLCXzFB27vBOl5O45A/a4/ wv5+OUYLSRMUpwarZWPJ8isU1iPFzRlfSdfcXKVw= 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/61] objtool: Treat .text.__x86.* as noinstr Date: Tue, 12 Jul 2022 20:39:19 +0200 Message-Id: <20220712183237.837418060@linuxfoundation.org> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220712183236.931648980@linuxfoundation.org> References: <20220712183236.931648980@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.7 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: 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) {