aarch64 haskell: check cap type in checkVSpaceRoot

Correctly check the type of the table the PageTableCap points to in
checkVSpaceRoot (must be a VSRootPT, not NormalPT).

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
This commit is contained in:
Gerwin Klein 2023-07-23 20:32:06 +02:00
parent d849c0bea2
commit e2355c7114
No known key found for this signature in database
GPG Key ID: 20A847CE6AB7F5F3
1 changed files with 1 additions and 0 deletions

View File

@ -470,6 +470,7 @@ checkVSpaceRoot :: Capability -> Int -> KernelF SyscallError (PPtr PTE, ASID)
checkVSpaceRoot vspaceCap argNo =
case vspaceCap of
ArchObjectCap (PageTableCap {
capPTType = VSRootPT_T,
capPTMappedAddress = Just (asid, _),
capPTBasePtr = vspace })
-> return (vspace, asid)