NX means "no execute". A region of memory can be marked as no-execute, and the processor will then refuse to run code from that region. This can be used to improve security by maintaining a strict separation between memory that is writable and memory that is executable. See W^X for details.
As of November 2022, Microsoft requires NX compatibility for all UEFI signing submissions. The specific requirements are:
IMAGE_DLLCHARACTERISTICS_NX_COMPAT
must be set.IMAGE_DLLCHARACTERISTICS_NX_COMPAT
must be set.EFI_MEMORY_ATTRIBUTE_PROTOCOL
is available, it must be used to enforce W^X on the child's sections.Most of the requirements are trivially satisfied by crdyboot; the executable produced by rustc already covers the first five requirements. The final requirement for enforcing NX compatibility in a child executable is handled in libcrdy/src/nx.rs
.