Explorar o código

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

greatbridf hai 7 meses
pai
achega
c64b5660fa
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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 {