Parcourir la source

fix(x86_64): as_table_attr should return None when encounter non-table page attributes

greatbridf il y a 7 mois
Parent
commit
c64b5660fa
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      crates/eonix_hal/src/arch/x86_64/mm.rs

+ 1 - 1
crates/eonix_hal/src/arch/x86_64/mm.rs

@@ -128,7 +128,7 @@ impl RawAttribute for PageAttribute64 {
         let mut table_attr = TableAttribute::empty();
 
         if self.0 & PA_PS != 0 {
-            panic!("Encountered a huge page while parsing table attributes");
+            return None;
         }
 
         if self.0 & PA_P != 0 {