mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-28 20:03:22 +00:00
Use the HUGE/PAT bit to track the validity of x86 PTEs
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
b269118c9a
commit
dc7e0d7a63
@ -57,9 +57,6 @@ where
|
||||
/// Operates on the mapping properties of the entry.
|
||||
///
|
||||
/// It only modifies the properties if the entry is present.
|
||||
// FIXME: in x86_64, you can protect a page with neither of the RWX
|
||||
// permissions. This would make the page not accessible and leaked. Such a
|
||||
// behavior is memory-safe but wrong. In RISC-V there's no problem.
|
||||
pub(in crate::mm) fn protect(&mut self, op: &mut impl FnMut(&mut PageProperty)) {
|
||||
if !self.pte.is_present() {
|
||||
return;
|
||||
|
Reference in New Issue
Block a user