Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp989328pxp; Wed, 16 Mar 2022 23:38:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwFXzCZzHdhOSz0cTalKNDTj8o3YUhA9RooRpCmjx7CLYyRaXSoa3pz9i54AvXIqDC5mZPT X-Received: by 2002:a17:90a:bf91:b0:1b9:bda3:10ff with SMTP id d17-20020a17090abf9100b001b9bda310ffmr3624386pjs.38.1647499130603; Wed, 16 Mar 2022 23:38:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647499130; cv=none; d=google.com; s=arc-20160816; b=EKjZdu94b9d/8JyAbn5ko2K/jPcmSjZoZVYeB1u5aKKY5gUpieSVMPZfj7PWok0dI2 zkNvF2Pcx943g0R37XxFXt3w4eYFDPrdButo2HTlVHElqtqfh2IEyzWZoL5HtmkMRx0M Fc/xX8tmHrz493FYH+Gn5zm03c9k0b38nUEhWwDrBrYryJA/im+6qh2YUI9DWkVJjdMo M3ky7GD61+p7jv0GwBPPuBXscssPIqyxHG49jwuzkz17UugaaS628O5QQt/zBekeTXDy towW/SS/f/W86G/Ol/9i7xP7AdkiMTpuQCPyK7WJ6cWpONfI42FhKkv8YO/80b/kiW8j Kbdg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=I24iEOm39f3KoXc9DR3nNWn7n6V53zLEWsTntZ8tBcw=; b=bTTG9VJJMyv4N6NaTEH0O6zoMf6pkhETlejUDpqfKzR1JY8H06Xh07NkhKav4BDPv0 X2O/3u3F4DMADxF97fEe8ceLIws6VmSe8yN0arhv/x7pcfeshCYoKNhqvshGV1pfAYq3 aB6ulfJZOCj+exoIP59dtMp5VQ1MmUZiH2/QIumwSjacevvQ/FIk/VW+T6sLQ5rhLAeF soEj0B4M4Cvuphzobe/aeXQAwTdMLSekmhSOWbl3COItqul3hG/UTA+0eZISleehG1eu EcFwAzDNWR+XxXtzAv1BPNedBewVwtjC1CffKPEPXLPubZWOB89Nodx6gPtzuVdIRPg/ SHKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=RNHp15mj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id mr9-20020a17090b238900b001befd89ad45si6474537pjb.145.2022.03.16.23.38.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Mar 2022 23:38:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=RNHp15mj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1E0C0243709; Wed, 16 Mar 2022 22:25:18 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353508AbiCPEQw (ORCPT + 99 others); Wed, 16 Mar 2022 00:16:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240261AbiCPEQv (ORCPT ); Wed, 16 Mar 2022 00:16:51 -0400 Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 55AFB4705F for ; Tue, 15 Mar 2022 21:15:38 -0700 (PDT) Received: by mail-pf1-x435.google.com with SMTP id s8so2183176pfk.12 for ; Tue, 15 Mar 2022 21:15:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=I24iEOm39f3KoXc9DR3nNWn7n6V53zLEWsTntZ8tBcw=; b=RNHp15mjCaWC0I38NdkhHl4ga654F6hUn9ZIEKZSyU36d9KuuaP/0IfdhualqSh5hp td23U2hxcrqWqwIOKwFW0IzAjo/hQsPO0cY60w15rh4b6rTtmYfhy7ZjpOibH7H/P7Mf eyhug2TKuoE1VX37YM1r07vnFqMnl4OpNJ2vuRBMAWFWAR4LlG7eEk7LgLfRMJSC3CJ4 veCKVFDWnvCotBkngd7QDuLI2wUbEZfCPtZEbQan4zgALBcXl9hhIvFuHnMupWnZYte4 I50RRtKLMxqFitl94zAy2Hijkc/UIZnLlTrqUbBx0g3oz92YKlqKReTF9hNuWtSz0ckD NAiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=I24iEOm39f3KoXc9DR3nNWn7n6V53zLEWsTntZ8tBcw=; b=Pqd8cD1TT6FWYvp0slxHjzOOZ8Q1SBRDoKdVHa80Wlbte9ldomOCfGkiOmt9JoXzYy KMuNZK8VJF2dAIBuv5pIgl/V4oqRYcMCdZI80HwAqE3aI8DHn8v46sX41hMC7b0mbVaD CxlFtWpbuDpMFL/+eV3tCYnR9l0q+rpbebsjtALXNVYi0OV0XOopGMCsJD0cbUkyvuEq x9MATnN9j+9C5ETEkBid7TgJJEdiWz00xorNOR1JXclMz+TrPW5loxiLl/g5rPyNDybL HOxl90+jWwAFYqpW7DLw1x/j1s/ok3KklOynyRpeCx1AB43XmBlVomE1hWlStD6YwLbo U71A== X-Gm-Message-State: AOAM530BZkwKmggOthKqkpp+wLiLN/e8o9hXnejBJ6w+tB/qutulTjxE KRZX1OJT70QFcS6o3t+YDiRBuwbBv7I= X-Received: by 2002:a63:6843:0:b0:37c:43ce:32e8 with SMTP id d64-20020a636843000000b0037c43ce32e8mr26792817pgc.456.1647404137725; Tue, 15 Mar 2022 21:15:37 -0700 (PDT) Received: from localhost ([198.11.178.15]) by smtp.gmail.com with ESMTPSA id b16-20020a056a00115000b004f6ff260c9esm755148pfm.207.2022.03.15.21.15.36 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Mar 2022 21:15:37 -0700 (PDT) From: Lai Jiangshan To: linux-kernel@vger.kernel.org Cc: x86@kernel.org, Lai Jiangshan , Joerg Roedel , Josh Poimboeuf , Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" Subject: [PATCH] x86/sev: Add ENCODE_FRAME_POINTER after stack changed for #VC Date: Wed, 16 Mar 2022 12:16:12 +0800 Message-Id: <20220316041612.71357-1-jiangshanlai@gmail.com> X-Mailer: git-send-email 2.19.1.6.gb485710b MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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: Lai Jiangshan In idtentry_vc(), the real frame is changed after it switches to new stack, ENCODE_FRAME_POINTER should be called in case for unwinder. Cc: Joerg Roedel Cc: Josh Poimboeuf Signed-off-by: Lai Jiangshan --- arch/x86/entry/entry_64.S | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S index e20eabaa56b8..f99f2881ed83 100644 --- a/arch/x86/entry/entry_64.S +++ b/arch/x86/entry/entry_64.S @@ -540,6 +540,7 @@ SYM_CODE_START(\asmsym) call vc_switch_off_ist movq %rax, %rsp /* Switch to new stack */ + ENCODE_FRAME_POINTER UNWIND_HINT_REGS /* Update pt_regs */ -- 2.19.1.6.gb485710b