From 3ac3e478c66e6a17fe22fd27cf621f468875a76c Mon Sep 17 00:00:00 2001 From: Soren Ptak Date: Tue, 26 Mar 2024 09:16:11 -0700 Subject: [PATCH] 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. --- portable/GCC/ARM_CRx_MPU/port.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/portable/GCC/ARM_CRx_MPU/port.c b/portable/GCC/ARM_CRx_MPU/port.c index bef3a7854..e4904e58d 100644 --- a/portable/GCC/ARM_CRx_MPU/port.c +++ b/portable/GCC/ARM_CRx_MPU/port.c @@ -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; }