Fix incorrect check for permitStoreLocalCap in capChecksMem.

The check was missing a NOT and was actually checking for permitStoreGlobalCap.
This commit is contained in:
Robert Norton
2021-08-05 12:16:21 +01:00
parent 5b23f4cea0
commit 7e2a946c4c

View File

@@ -125,7 +125,7 @@ function Maybe#(CSR_XCapCause) capChecksMem(CapPipe auth, CapPipe data, CapCheck
result = eAuth(cheriExcPermitWViolation);
else if (storeValidCap && !getHardPerms(auth).permitStoreCap)
result = eAuth(cheriExcPermitWCapViolation);
else if (storeValidCap && !getHardPerms(auth).permitStoreLocalCap && getHardPerms(data).global)
else if (storeValidCap && !getHardPerms(auth).permitStoreLocalCap && !getHardPerms(data).global)
result = eAuth(cheriExcPermitWLocalCapViolation);
return result;
endfunction