mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 18:37:34 +00:00
Kernel: Don't treat read faults like CoW exceptions
I'm not sure why we would have a non-readable CoW region, but I suppose we could, so let's not Copy-on-Read in those cases.
This commit is contained in:
parent
af4cf01560
commit
945f8eb22a
2 changed files with 9 additions and 3 deletions
|
@ -304,14 +304,20 @@ public:
|
|||
}
|
||||
|
||||
enum class Type {
|
||||
PageNotPresent,
|
||||
ProtectionViolation,
|
||||
PageNotPresent = PageFaultFlags::NotPresent,
|
||||
ProtectionViolation = PageFaultFlags::ProtectionViolation,
|
||||
};
|
||||
|
||||
enum class Access {
|
||||
Read = PageFaultFlags::Read,
|
||||
Write = PageFaultFlags::Write,
|
||||
};
|
||||
|
||||
VirtualAddress vaddr() const { return m_vaddr; }
|
||||
u16 code() const { return m_code; }
|
||||
|
||||
Type type() const { return (Type)(m_code & 1); }
|
||||
Access access() const { return (Access)(m_code & 2); }
|
||||
|
||||
bool is_not_present() const { return (m_code & 1) == PageFaultFlags::NotPresent; }
|
||||
bool is_protection_violation() const { return (m_code & 1) == PageFaultFlags::ProtectionViolation; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue