kern/ldr: add support for --x executables

This commit is contained in:
Michael Scire authored and SciresM committed 2024-10-15 21:48:59 -07:00
1 parent 2855b8ee35
commit ff38a32a9b
9 files changed
+54 -40

No files matched your search

@@ -1787,6 +1787,11 @@ namespace ams::kern {
/* We're going to perform an update, so create a helper. */
KScopedPageTableUpdater updater(this);
/* If we're creating an executable mapping, take and immediately release the scheduler lock. This will force a reschedule. */
if (is_x) {
KScopedSchedulerLock sl;
}
/* Perform mapping operation. */
const KPageProperties properties = { new_perm, false, false, DisableMergeAttribute_None };
const auto operation = was_x ? OperationType_ChangePermissionsAndRefreshAndFlush : OperationType_ChangePermissions;