From 6609bd10c5d4b901e8facabe48c7fb30b80cc40f Mon Sep 17 00:00:00 2001 From: Erin Date: Wed, 9 Aug 2023 20:19:12 +0200 Subject: [PATCH] executable --- hbvm/src/softpaging/mod.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hbvm/src/softpaging/mod.rs b/hbvm/src/softpaging/mod.rs index c33bc11..07e05a5 100644 --- a/hbvm/src/softpaging/mod.rs +++ b/hbvm/src/softpaging/mod.rs @@ -501,6 +501,12 @@ pub mod perm_check { pub const fn writable(perm: Permission) -> bool { matches!(perm, Permission::Write) } + + /// Page is executable + #[inline(always)] + pub const fn executable(perm: Permission) -> bool { + matches!(perm, Permission::Exec) + } } /// Handle VM traps