MultiArchUefiPkg icon indicating copy to clipboard operation
MultiArchUefiPkg copied to clipboard

Add EFI wrappers for SetMemoryAttributes, AllocatePages, AllocatePool

Open andreiw opened this issue 2 years ago • 1 comments

Catch/filter SetMemoryAttributes to ignore any attempts to change attributes for the emulated image itself, as on architectures that use no-exec protection, this would lead to a crash.

Also, technically would also need to wrap AllocatePages and track attempts to allocate code regions (so that these can be protected).

Not a driver use case, but a correctness one.

andreiw avatar Mar 22 '23 05:03 andreiw

This includes EFI_CPU_ARCH_PROTOCOL SetMemoryAttributes and the entire EFI_MEMORY_ATTRIBUTE_PROTOCOL

andreiw avatar Mar 22 '23 05:03 andreiw