kern/ldr: add support for --x executables

This commit is contained in:
Michael Scire 2024-10-09 17:42:02 -07:00 committed by SciresM
parent 2855b8ee35
commit ff38a32a9b
9 changed files with 54 additions and 40 deletions

View file

@ -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;