Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp458216imi; Fri, 22 Jul 2022 02:49:59 -0700 (PDT) X-Google-Smtp-Source: AGRyM1s1WQto7XfEWxSNMW8vyt5Xb1hxOfsgceNVyR3z+dImJ9Hn3EtVZCXQsRijANV5LF5V+XS1 X-Received: by 2002:a17:90b:1917:b0:1f2:1e2e:83fb with SMTP id mp23-20020a17090b191700b001f21e2e83fbmr3271240pjb.227.1658483399291; Fri, 22 Jul 2022 02:49:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658483399; cv=none; d=google.com; s=arc-20160816; b=L9gAbucRjNqAfBf8+jvQgvnDq6/P+HTppIvJe8ohTW7G6QYFXk62MKxMoNmduboPhX phh+l5DMN+LQBkyoUNlXg8a+lsHu6GxsEoTXsCFF3uGKyHxBB8Tklc+8pw21Rp/oOn1p BfybvLYI1T3fVFpiAQJS8h9gZ4yXzIrM3M2R4AulbYsB3sVN/YeRHQNtChuRK3MUx8Nk PdL54qT6kj+gQXBT/R+UWm7LMSnUjXuprupzEoV85t0E6xSk0QbY5Dppb3LlK1RVrD+Z 8FMp2Ck2rHtpC5KbMkkX/4TIZtGRNPmR91zm8Rk8CGm1l0wZoUYmLR+JEsBtt5A6XInZ r+cA== 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=fCCPsLoEWqf3HebXEub3jQ0ZFOaR68HM6dw4klMfj5M=; b=LksEiqwJ6rbhVMVRxDf3mXQhZOj9yfMVRikR3mpOGCg8SJ9gR2MjlbPHbi6uQPnkxp QyRB9pUsaj68HPrS1dVIN2tTSuHvqC67LicmNnMokniMED1Spit7Orvl0g/dFbZmyfuM TbTPODlDInASD3jl7l3eOCapieFb7z9Qv7klD1+o9TrhDI0fr9MLJua+EVMyLDq5qglV SBF3OmLqW6/UiKQfslbm9efjgLX4ymAcnkeP/EPYrTdfjZ2ZSzOZg14/0LcayjJBF51H RWjFoIxq9MtvKXRn5bDlESef0Fv48jDPndo69G/BHX7gbniaqbhT/O6CTijz2G87o9/O rSUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=NkKibjQt; 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 pj9-20020a17090b4f4900b001f24b418354si1539255pjb.117.2022.07.22.02.49.44; Fri, 22 Jul 2022 02:49:59 -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=NkKibjQt; 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 S235503AbiGVJOf (ORCPT + 99 others); Fri, 22 Jul 2022 05:14:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235456AbiGVJNu (ORCPT ); Fri, 22 Jul 2022 05:13:50 -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 338A4AF72E; Fri, 22 Jul 2022 02:10:51 -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 8DEFE61D7E; Fri, 22 Jul 2022 09:10:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 911D4C341C7; Fri, 22 Jul 2022 09:10:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1658481050; bh=15TToz8XKhbmTcApF7Z9A6OBETY/DRBlolp+6qvTRso=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NkKibjQtk6gIwaR8s/bj/7iYnjCoxvdpCxDoAl+T1TpB/EBPVWUqgVz9Eo61SOq5t 2I1mTuNt3bns2sFuWvLFnDojlF/hwJUJfuUPO67y5RFNoh5Y1u7qXspirsn2a4KqoO EpHwQBAAbfGMWEituIHwbDwtzLWd8yhkY3BW+6L8= 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 36/70] x86/xen: Add UNTRAIN_RET Date: Fri, 22 Jul 2022 11:07:31 +0200 Message-Id: <20220722090652.742356161@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 d147553b64bad34d2f92cb7d8ba454ae95c3baac upstream. Ensure the Xen entry also passes through UNTRAIN_RET. 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 --- arch/x86/entry/entry_64.S | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) --- a/arch/x86/entry/entry_64.S +++ b/arch/x86/entry/entry_64.S @@ -323,6 +323,12 @@ SYM_CODE_END(ret_from_fork) #endif .endm +SYM_CODE_START_LOCAL(xen_error_entry) + UNWIND_HINT_FUNC + UNTRAIN_RET + RET +SYM_CODE_END(xen_error_entry) + /** * idtentry_body - Macro to emit code calling the C function * @cfunc: C function to be called @@ -342,7 +348,7 @@ SYM_CODE_END(ret_from_fork) * switch the CR3. So it can skip invoking error_entry(). */ ALTERNATIVE "call error_entry; movq %rax, %rsp", \ - "", X86_FEATURE_XENPV + "call xen_error_entry", X86_FEATURE_XENPV ENCODE_FRAME_POINTER UNWIND_HINT_REGS