From: "Yao, Jiewen" <jiewen.yao@intel.com>
To: Laszlo Ersek <lersek@redhat.com>
Cc: edk2-devel-01 <edk2-devel@lists.01.org>
Subject: Re: memory protection crash in PiSmmCpuDxeSmm, Ia32 build with RAM above 4GB
Date: Sat, 8 Jul 2017 13:38:47 +0000 [thread overview]
Message-ID: <74D8A39837DF1E4DA445A8C0B3885C503A97870B@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <f9557a73-4d7f-beff-35fd-bb5b7b71c6a0@redhat.com>
Thanks Laszlo. I think this is a special case we did not test before. And it is a bug we need fix.
Unfortunately, I am out of office these days with limited email access. I just saw the email today.
I have a quick look at the code. I believe we need add below check in UefiCpuPkg\PiSmmCpuDxeSmm\SmmCpuMemoryManagement.c, ConvertMemoryPageAttributes()
==========================
if (BaseAddress > MAX_ADDRESS) {
return RETURN_UNSUPPORTED;
}
if (Length > MAX_ADDRESS) {
return RETURN_UNSUPPORTED;
}
if ((Length != 0) && (BaseAddress > MAX_ADDRESS - (Length - 1))) {
return RETURN_UNSUPPORTED;
}
==========================
to filter invalid address in IA32.
(Well, it is valid for OS, because OS may use PAE to match to lower. But it is invalid for UEFI, because UEFI uses identical address)
Would you please file an HSD for that?
Thank you
Yao Jiewen
> -----Original Message-----
> From: Laszlo Ersek [mailto:lersek@redhat.com]
> Sent: Saturday, July 8, 2017 10:12 AM
> To: Yao, Jiewen <jiewen.yao@intel.com>
> Cc: edk2-devel-01 <edk2-devel@lists.01.org>
> Subject: memory protection crash in PiSmmCpuDxeSmm, Ia32 build with RAM
> above 4GB
>
> Hi Jiewen,
>
> I just noticed that building OvmfIa32.dsc with -D SMM_REQUIRE, and then
> running the 32-bit guest with 4G RAM (of which 2GB are placed in 64-bit
> address pace), the guest crashes when PiSmmCpuDxeSmm tries to protect
> the memory range at 4GB. Please find the log attached (it ends with the
> crash).
>
> Is this expected to work?
>
> Thanks
> Laszlo
next prev parent reply other threads:[~2017-07-08 13:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-08 2:12 memory protection crash in PiSmmCpuDxeSmm, Ia32 build with RAM above 4GB Laszlo Ersek
2017-07-08 13:38 ` Yao, Jiewen [this message]
2017-07-08 19:50 ` Laszlo Ersek
2017-07-17 1:40 ` Yao, Jiewen
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=74D8A39837DF1E4DA445A8C0B3885C503A97870B@shsmsx102.ccr.corp.intel.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