Add removed unprivileged access check to ARM_CRx_MPU xPortIsAuthorizedToAccessBuffer() (#1016)

* Add in a removed check for if a task is attempting to read a variable from a location it has write access to in xPortIsAuthorizedToAccessBuffer.

* Add in a portDONT_DISCARD symbol as well.
This commit is contained in:
Soren Ptak 2024-03-26 22:07:11 -07:00 committed by GitHub
parent 345a86d49b
commit a455b86bd3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 1 deletions

View file

@ -598,7 +598,9 @@ static BaseType_t prvMPURegionAuthorizesBuffer( const xMPU_REGION_REGISTERS * xT
if( ulAccessRequested == tskMPU_READ_PERMISSION ) /* RO. */
{
if( ( ulMPURegionAccessPermissions == portMPU_REGION_PRIV_RW_USER_RO ) ||
( ulMPURegionAccessPermissions == portMPU_REGION_PRIV_RO_USER_RO ) )
( ulMPURegionAccessPermissions == portMPU_REGION_PRIV_RO_USER_RO ) ||
( ulMPURegionAccessPermissions == portMPU_REGION_PRIV_RW_USER_RW ) )
{
xAccessGranted = pdTRUE;
}