Преглед изворни кода

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

greatbridf пре 7 месеци
родитељ
комит
c64b5660fa
1 измењених фајлова са 1 додато и 1 уклоњено
  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 {