Branch: refs/heads/master
Home: https://github.com/tianocore/edk2
Commit: 4bfd668e5edb59092a8e16414b3f6632efdac4f2
https://github.com/tianocore/edk2/commit/4bfd668e5edb59092a8e16414b3f6632efdac4f2
Author: Ray Ni <[email protected]>
Date: 2022-06-23 (Thu, 23 Jun 2022)
Changed paths:
M UefiCpuPkg/CpuDxe/CpuPageTable.c
Log Message:
-----------
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 <[email protected]>
Reviewed-by: Ray Ni <[email protected]>
Cc: Rahul Kumar <[email protected]>
Signed-off-by: Taylor Beebe <[email protected]>
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits