audk/UefiCpuPkg
Ray Ni 4bfd668e5e UefiCpuPkg: CpuDxe: Set RW and P Attributes on Split Pages
A memory range can be submitted for attribute changes which is large
enough to not require a page split during the attribute update. Consider
the following scenario:

1. An attribute update removed the RW attribute on a range large enough
to not require a page split.
2. Later, an attributes update is called to re-add the RW attribute for
a subsection of that larger page which requires a split
3. The attribute update logic performs a page split, so now the parent
and child pages have matching attributes
4. Then, the attribute update logic changes the child page to have the
RW attribute.
5. The child page would then correctly have the RW attribute added but
the parent page would still have the RW attribute removed which will
cause an improper access violation.

The page being split should have loose attributes to accommodate the
above case. The split page should always have the attributes set so
the lowest level page frame determines the access rights as detailed
in 4.10.2.2 of the Intel 64 and IA-32 Architectures Software
Developer Manual. Setting the User/Supervisor attribute shouldn't
be necessary.

Cc: Eric Dong <eric.dong@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Signed-off-by: Taylor Beebe <t@taylorbeebe.com>
2022-06-23 06:36:56 +00:00
..
Application/Cpuid UefiCpuPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
CpuDxe UefiCpuPkg: CpuDxe: Set RW and P Attributes on Split Pages 2022-06-23 06:36:56 +00:00
CpuFeatures UefiCpuPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
CpuIo2Dxe UefiCpuPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
CpuIo2Smm UefiCpuPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
CpuIoPei UefiCpuPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
CpuMpPei CpuException: Add InitializeSeparateExceptionStacks 2022-06-10 07:54:48 +00:00
CpuS3DataDxe UefiCpuPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
Include MdePkg: add SmmCpuRendezvousLib.h and SmmCpuRendezvousLibNull implement. 2022-05-09 02:04:11 +00:00
Library MpInitLib: Move the Above1Mb vector allocation to MpInitLibInitialize 2022-06-10 12:15:49 +00:00
MicrocodeMeasurementDxe UefiCpuPkg: Extend measurement of microcode patches to TPM 2021-12-24 09:08:20 +00:00
PiSmmCommunication UefiCpuPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PiSmmCpuDxeSmm UefiCpuPkg: Add CpuLib to module INFs that depend on UefiCpuLib. 2022-05-06 07:48:15 +00:00
ResetVector UefiCpuPkg: Update BFV searching algorithm in VTF0 2022-03-28 02:14:36 +00:00
SecCore UefiCpuPkg: Add CpuLib to module INFs that depend on UefiCpuLib. 2022-05-06 07:48:15 +00:00
SecMigrationPei UefiCpuPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
Test UefiCpuPkg/MtrrLib/UnitTest: Add host based unit test 2020-08-12 11:38:37 +00:00
Universal/Acpi/S3Resume2Pei UefiCpuPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
UefiCpuPkg.ci.yaml UefiCpuPkg: VTF0 Linear-Address Translation to a 1-GByte Page till 512GB 2021-09-16 14:18:27 +00:00
UefiCpuPkg.dec MdePkg: add SmmCpuRendezvousLib.h and SmmCpuRendezvousLibNull implement. 2022-05-09 02:04:11 +00:00
UefiCpuPkg.dsc UefiCpuPkg: Extend SMM CPU Service with rendezvous support. 2022-03-04 05:44:42 +00:00
UefiCpuPkg.uni UefiCpuPkg: Create an SEV-ES workarea PCD 2020-08-17 02:46:39 +00:00
UefiCpuPkgExtra.uni UefiCpuPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:28 -07:00