aarch64 haskell: fix syscall arg error reporting

The argument numbers in the error messages for
decodeARMFrameInvocationMap are slightly off.

Same bug exists in C, see also seL4/seL4#1075.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
This commit is contained in:
Gerwin Klein 2023-07-23 20:30:42 +02:00 committed by Achim D. Brucker
parent ee99bb90e1
commit 1af82d8a01
1 changed files with 2 additions and 2 deletions

View File

@ -542,8 +542,8 @@ decodeARMFrameInvocationMap cte cap vptr rightsMask attr vspaceCap = do
let pgBits = pageBitsForSize frameSize
case capFMappedAddress cap of
Just (asid', vaddr') -> do
when (asid' /= asid) $ throw $ InvalidCapability 0
when (vaddr' /= vptr) $ throw $ InvalidArgument 2
when (asid' /= asid) $ throw $ InvalidCapability 1
when (vaddr' /= vptr) $ throw $ InvalidArgument 0
Nothing -> do
let vtop = vptr + (bit pgBits - 1)
when (vtop > pptrUserTop) $ throw $ InvalidArgument 0