On Thu, Dec 12, 2024 at 10:44 AM <devel-requ...@lists.crash-utility.osci.io>
wrote:

> Date: Thu, 12 Dec 2024 12:53:08 +1300
> From: Tao Liu <l...@redhat.com>
> Subject: [Crash-utility] Re: [PATCH] x86_64: Mark #VC stack
>         unavailable when CONFIG_AMD_MEM_ENCRYPT is not set
> To: Hou Wenlong <houwenlong....@antgroup.com>
> Cc: devel@lists.crash-utility.osci.io
> Message-ID:
>         <CAO7dBbWi06FCj36_UPMXN3cs_=xQZd-oM=
> haz7ezrvptkvw...@mail.gmail.com>
> Content-Type: text/plain; charset="UTF-8"
>
> Hi Hou,
>
> On Wed, Dec 11, 2024 at 2:36 PM Hou Wenlong <houwenlong....@antgroup.com>
> wrote:
> >
> > When 'CONFIG_AMD_MEM_ENCRYPT' is not set, the IDT handler for #VC is not
> > registered, but the address of the #VC IST stack is still set in
> > tss_setup_ist(). Therefore, the name of the associated exception stack
> > is "UNKNOWN" instead of "VC". Although the base of the exception stack
> > is not zero and is available, it is not accessible, which will cause the
> > backtrace to fail when attempting to access the #VC stack. To fix this,
> > remove the name check.
> >
> > Signe-off-by: Hou Wenlong <houwenlong....@antgroup.com>
> > ---
> >  x86_64.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/x86_64.c b/x86_64.c
> > index e7f8fe25b31f..ee12ba095e6e 100644
> > --- a/x86_64.c
> > +++ b/x86_64.c
> > @@ -1540,7 +1540,7 @@ x86_64_ist_init(void)
> >
> >                                 ms->stkinfo.available[c][i] = TRUE;
> >                                 /* VC stack can be unmapped if SEV-ES is
> disabled or not supported. */
> > -                               if
> (STREQ(ms->stkinfo.exception_stacks[i], "VC") &&
> > +                               if (ms->stkinfo.ebase[c][i] &&
> >                                     !accessible(ms->stkinfo.ebase[c][i]))
>
> I agree the ms->stkinfo.ebase[c][i] should always be checked for
> "accessible", not just for "VC" stacks, so removing the "VC" name
> checking is reasonable. The code LGTM, so ack.
>

Applied(with slight changes):
https://github.com/crash-utility/crash/commit/8a11aa07d7b0f0e0fc165365376c0b8af9da7be8


>
> Thanks,
> Tao Liu
>
> >                                         ms->stkinfo.available[c][i] =
> FALSE;
> >                         }
> >
> > base-commit: f13853cef53f5c5463a51021edbc81977e2b1405
> > --
> > 2.31.1
>
--
Crash-utility mailing list -- devel@lists.crash-utility.osci.io
To unsubscribe send an email to devel-le...@lists.crash-utility.osci.io
https://${domain_name}/admin/lists/devel.lists.crash-utility.osci.io/
Contribution Guidelines: https://github.com/crash-utility/crash/wiki

Reply via email to