[Crash-utility] [PATCH] Clear ununsed exception stack base
Alexey Makhalov
amakhalov at vmware.com
Mon Nov 23 17:02:56 UTC 2020
Hi Samuelliao,
I’ve sent similar patch some time ago:
https://www.redhat.com/archives/crash-utility/2020-November/msg00005.html
Review response was "it seems we should support this properly.”
Here is support for VC stack from me (not yet reviewed/merged)
https://www.redhat.com/archives/crash-utility/2020-November/msg00039.html
Regards,
—Alexey
> On Nov 22, 2020, at 11:00 PM, samuelliao(廖生苗) <samuelliao at tencent.com> wrote:
>
> SEV-ES code may fill the 4th ist to VC_stack, but crash-util has no
> support for #VC frames. It break backtrace due the zero-size stack.
> So clear all unused stack base to workaround it.
>
> Signed-off-by: samuelliao <samuelliao at samuelliao.com>
> ---
> x86_64.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/x86_64.c b/x86_64.c
> index 939c8a9..382cff1 100644
> --- a/x86_64.c
> +++ b/x86_64.c
> @@ -1462,7 +1462,10 @@ x86_64_ist_init(void)
> for (i = 0; i < MAX_EXCEPTION_STACKS; i++) {
> if (ms->stkinfo.ebase[c][i] == 0)
> continue;
> - ms->stkinfo.ebase[c][i] -= ms->stkinfo.esize[i];
> + if(ms->stkinfo.esize[i] == 0)
> + ms->stkinfo.ebase[c][i] = 0;
> + else
> + ms->stkinfo.ebase[c][i] -= ms->stkinfo.esize[i];
> }
> }
>
> --
> 2.18.4
>
>
>
>
> --
> Crash-utility mailing list
> Crash-utility at redhat.com
> https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.redhat.com%2Fmailman%2Flistinfo%2Fcrash-utility&data=04%7C01%7Camakhalov%40vmware.com%7C3248ce3a278341c7a47308d88f7e3d84%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C1%7C637417119662757671%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=CbRNyQe9axukidzOzvQVaE5TWxJPCOe6n2jry3CMinU%3D&reserved=0
More information about the Crash-utility
mailing list