瀏覽代碼

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 {