From: Josh Poimboeuf <jpoimboe@redhat.com>
To: Lai Jiangshan <jiangshanlai@gmail.com>
Cc: linux-kernel@vger.kernel.org, x86@kernel.org,
Lai Jiangshan <jiangshan.ljs@antgroup.com>,
Joerg Roedel <jroedel@suse.de>, Andy Lutomirski <luto@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [PATCH] x86/sev: Add ENCODE_FRAME_POINTER after stack changed for #VC
Date: Thu, 17 Mar 2022 15:19:43 -0700 [thread overview]
Message-ID: <20220317221943.6vhoqx3fdv7py6hi@treble> (raw)
In-Reply-To: <20220316041612.71357-1-jiangshanlai@gmail.com>
On Wed, Mar 16, 2022 at 12:16:12PM +0800, Lai Jiangshan wrote:
> From: Lai Jiangshan <jiangshan.ljs@antgroup.com>
>
> 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 <jroedel@suse.de>
> Cc: Josh Poimboeuf <jpoimboe@redhat.com>
> Signed-off-by: Lai Jiangshan <jiangshan.ljs@antgroup.com>
> ---
> 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 */
Looks right to me. Any chance you have the ability to test this
scenario by unwinding from #VC with CONFIG_FRAME_POINTER?
--
Josh
next prev parent reply other threads:[~2022-03-17 22:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-16 4:16 Lai Jiangshan
2022-03-17 22:19 ` Josh Poimboeuf [this message]
2022-03-18 1:14 ` Lai Jiangshan
2022-03-18 17:03 ` Josh Poimboeuf
2022-04-12 12:24 ` Lai Jiangshan
2022-04-27 8:26 ` Lai Jiangshan
2022-05-13 9:04 ` Lai Jiangshan
2022-05-18 18:44 ` [tip: x86/sev] x86/sev: Annotate stack change in the #VC handler tip-bot2 for Lai Jiangshan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220317221943.6vhoqx3fdv7py6hi@treble \
--to=jpoimboe@redhat.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=jiangshan.ljs@antgroup.com \
--cc=jiangshanlai@gmail.com \
--cc=jroedel@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®