Browse Source

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

greatbridf 7 months ago
parent
commit
c64b5660fa
1 changed files with 1 additions and 1 deletions
  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 {