mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 21:11:57 -04:00
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:
parent
345a86d49b
commit
a455b86bd3
|
@ -598,7 +598,9 @@ static BaseType_t prvMPURegionAuthorizesBuffer( const xMPU_REGION_REGISTERS * xT
|
||||||
if( ulAccessRequested == tskMPU_READ_PERMISSION ) /* RO. */
|
if( ulAccessRequested == tskMPU_READ_PERMISSION ) /* RO. */
|
||||||
{
|
{
|
||||||
if( ( ulMPURegionAccessPermissions == portMPU_REGION_PRIV_RW_USER_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;
|
xAccessGranted = pdTRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -221,6 +221,13 @@ typedef uint32_t TickType_t;
|
||||||
*/
|
*/
|
||||||
#define portMEMORY_BARRIER() __asm volatile( "" ::: "memory" )
|
#define portMEMORY_BARRIER() __asm volatile( "" ::: "memory" )
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Ensure a symbol isn't removed from the compilation unit.
|
||||||
|
*
|
||||||
|
* @ingroup Port Interface Specifications
|
||||||
|
*/
|
||||||
|
#define portDONT_DISCARD __attribute__( ( used ) )
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Defines if the tick count can be accessed atomically.
|
* @brief Defines if the tick count can be accessed atomically.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue