From: Laszlo Ersek <lersek@redhat.com>
To: Jian J Wang <jian.j.wang@intel.com>, edk2-devel@lists.01.org
Cc: Ruiyu Ni <ruiyu.ni@intel.com>, Eric Dong <eric.dong@intel.com>
Subject: Re: [PATCH] UefiCpuPkg/CpuExceptionHandlerLib: fix incorrect init of exception stack
Date: Tue, 27 Feb 2018 11:26:54 +0100 [thread overview]
Message-ID: <7667ffac-4090-4489-af73-c9ffedbe1b39@redhat.com> (raw)
In-Reply-To: <20180227051914.9892-1-jian.j.wang@intel.com>
On 02/27/18 06:19, Jian J Wang wrote:
> The field KnownGoodStackTop in CPU_EXCEPTION_INIT_DATA is initialized to
> the start address of array mNewStack. This is wrong. It must be the end
> of mNewStack. This patch fixes this mistake.
>
> Cc: Ruiyu Ni <ruiyu.ni@intel.com>
> Cc: Eric Dong <eric.dong@intel.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Jian J Wang <jian.j.wang@intel.com>
> ---
> UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeException.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeException.c b/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeException.c
> index 6d1b54d31d..2a090782fc 100644
> --- a/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeException.c
> +++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeException.c
> @@ -270,7 +270,7 @@ InitializeCpuExceptionHandlersEx (
> AsmReadGdtr (&Gdtr);
>
> EssData.X64.Revision = CPU_EXCEPTION_INIT_DATA_REV;
> - EssData.X64.KnownGoodStackTop = (UINTN)mNewStack;
> + EssData.X64.KnownGoodStackTop = (UINTN)mNewStack + sizeof (mNewStack);
> EssData.X64.KnownGoodStackSize = CPU_KNOWN_GOOD_STACK_SIZE;
> EssData.X64.StackSwitchExceptions = CPU_STACK_SWITCH_EXCEPTION_LIST;
> EssData.X64.StackSwitchExceptionNumber = CPU_STACK_SWITCH_EXCEPTION_NUMBER;
>
Can you add the following to the commit message?
Fixes: 0ff5aa9cae1ea276668fa4398d047aa9fda3c2c7
With that,
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Thanks
Laszlo
prev parent reply other threads:[~2018-02-27 10:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-27 5:19 [PATCH] UefiCpuPkg/CpuExceptionHandlerLib: fix incorrect init of exception stack Jian J Wang
2018-02-27 10:26 ` Laszlo Ersek [this message]
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-list 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=7667ffac-4090-4489-af73-c9ffedbe1b39@redhat.com \
--to=devel@edk2.groups.io \
/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