> + // > + // If page table memory has been marked as RO, mark the new pool pages as > read-only. > + // > + if (mIsReadOnlyPageTable) { > + AsmWriteCr0 (AsmReadCr0 () & ~CR0_WP); > + SmmSetMemoryAttributes ((EFI_PHYSICAL_ADDRESS)(UINTN)Buffer, > EFI_PAGES_TO_SIZE (PoolPages), > EFI_MEMORY_RO); > + AsmWriteCr0 (AsmReadCr0 () | CR0_WP); > + } > +
If you check other logic that clears WP bit in CR0, CET is disabled before clearing WP. You need to follow the same pattern here. Other looks good to me. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#97547): https://edk2.groups.io/g/devel/message/97547 Mute This Topic: https://groups.io/mt/95703346/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-