FreeRTOS-Kernel/portable/GCC
kar-rahul-aws 170a291d4d
Add Access Control List to MPU ports (#765)
This PR adds Access Control to kernel objects on a per task basis to MPU
ports. The following needs to be defined in the `FreeRTOSConfig.h` to
enable this feature:

```c
#define configUSE_MPU_WRAPPERS_V1 0
#define configENABLE_ACCESS_CONTROL_LIST 1
```

This PR adds the following new APIs:

```c
void vGrantAccessToTask( TaskHandle_t xTask,
                         TaskHandle_t xTaskToGrantAccess );
void vRevokeAccessToTask( TaskHandle_t xTask,
                          TaskHandle_t xTaskToRevokeAccess );

void vGrantAccessToSemaphore( TaskHandle_t xTask,
                              SemaphoreHandle_t xSemaphoreToGrantAccess );
void vRevokeAccessToSemaphore( TaskHandle_t xTask,
                               SemaphoreHandle_t xSemaphoreToRevokeAccess );

void vGrantAccessToQueue( TaskHandle_t xTask,
                          QueueHandle_t xQueueToGrantAccess );
void vRevokeAccessToQueue( TaskHandle_t xTask,
                           QueueHandle_t xQueueToRevokeAccess );

void vGrantAccessToQueueSet( TaskHandle_t xTask,
                             QueueSetHandle_t xQueueSetToGrantAccess );
void vRevokeAccessToQueueSet( TaskHandle_t xTask,
                              QueueSetHandle_t xQueueSetToRevokeAccess );

void vGrantAccessToEventGroup( TaskHandle_t xTask,
                               EventGroupHandle_t xEventGroupToGrantAccess );
void vRevokeAccessToEventGroup( TaskHandle_t xTask,
                                EventGroupHandle_t xEventGroupToRevokeAccess );

void vGrantAccessToStreamBuffer( TaskHandle_t xTask,
                                 StreamBufferHandle_t xStreamBufferToGrantAccess );
void vRevokeAccessToStreamBuffer( TaskHandle_t xTask,
                                  StreamBufferHandle_t xStreamBufferToRevokeAccess );

void vGrantAccessToMessageBuffer( TaskHandle_t xTask,
                                  MessageBufferHandle_t xMessageBufferToGrantAccess );
void vRevokeAccessToMessageBuffer( TaskHandle_t xTask,
                                   MessageBufferHandle_t xMessageBufferToRevokeAccess );

void vGrantAccessToTimer( TaskHandle_t xTask,
                          TimerHandle_t xTimerToGrantAccess );
void vRevokeAccessToTimer( TaskHandle_t xTask,
                           TimerHandle_t xTimerToRevokeAccess );
```

An unprivileged task by default has access to itself only and no other
kernel object. The application writer needs to explicitly grant an
unprivileged task access to all the kernel objects it needs. The best
place to do that is before starting the scheduler when all the kernel
objects are created. 

For example, let's say an unprivileged tasks needs access to a queue and
an event group, the application writer needs to do the following:

```c
vGrantAccessToQueue( xUnprivilegedTaskHandle, xQueue );
vGrantAccessToEventGroup( xUnprivilegedTaskHandle, xEventGroup );
```

The application writer MUST revoke all the accesses before deleting a
task. Failing to do so will result in undefined behavior. In the above
example, the application writer needs to make the following 2 calls
before deleting the task:

```c
vRevokeAccessToQueue( xUnprivilegedTaskHandle, xQueue );
vRevokeAccessToEventGroup( xUnprivilegedTaskHandle, xEventGroup );

```
2023-09-18 15:34:42 +05:30
..
ARM7_AT91FR40008 CI-CD Updates (#768) 2023-09-05 14:24:04 -07:00
ARM7_AT91SAM7S CI-CD Updates (#768) 2023-09-05 14:24:04 -07:00
ARM7_LPC23xx CI-CD Updates (#768) 2023-09-05 14:24:04 -07:00
ARM7_LPC2000 CI-CD Updates (#768) 2023-09-05 14:24:04 -07:00
ARM_CA9 CI-CD Updates (#768) 2023-09-05 14:24:04 -07:00
ARM_CA53_64_BIT CI-CD Updates (#768) 2023-09-05 14:24:04 -07:00
ARM_CA53_64_BIT_SRE CI-CD Updates (#768) 2023-09-05 14:24:04 -07:00
ARM_CM0 CI-CD Updates (#768) 2023-09-05 14:24:04 -07:00
ARM_CM3 CI-CD Updates (#768) 2023-09-05 14:24:04 -07:00
ARM_CM3_MPU Add Access Control List to MPU ports (#765) 2023-09-18 15:34:42 +05:30
ARM_CM4_MPU Add Access Control List to MPU ports (#765) 2023-09-18 15:34:42 +05:30
ARM_CM4F CI-CD Updates (#768) 2023-09-05 14:24:04 -07:00
ARM_CM7 Add Trace Hook Macros and function that returns the start of the stack. (#659) 2023-09-07 16:20:13 -07:00
ARM_CM23 Add Access Control List to MPU ports (#765) 2023-09-18 15:34:42 +05:30
ARM_CM23_NTZ/non_secure Add Access Control List to MPU ports (#765) 2023-09-18 15:34:42 +05:30
ARM_CM33 Add Access Control List to MPU ports (#765) 2023-09-18 15:34:42 +05:30
ARM_CM33_NTZ/non_secure Add Access Control List to MPU ports (#765) 2023-09-18 15:34:42 +05:30
ARM_CM35P Add Access Control List to MPU ports (#765) 2023-09-18 15:34:42 +05:30
ARM_CM35P_NTZ/non_secure Add Access Control List to MPU ports (#765) 2023-09-18 15:34:42 +05:30
ARM_CM55 Add Access Control List to MPU ports (#765) 2023-09-18 15:34:42 +05:30
ARM_CM55_NTZ/non_secure Add Access Control List to MPU ports (#765) 2023-09-18 15:34:42 +05:30
ARM_CM85 Add Access Control List to MPU ports (#765) 2023-09-18 15:34:42 +05:30
ARM_CM85_NTZ/non_secure Add Access Control List to MPU ports (#765) 2023-09-18 15:34:42 +05:30
ARM_CR5 CI-CD Updates (#768) 2023-09-05 14:24:04 -07:00
ARM_CRx_No_GIC CI-CD Updates (#768) 2023-09-05 14:24:04 -07:00
ATMega323 CI-CD Updates (#768) 2023-09-05 14:24:04 -07:00
AVR32_UC3 CI-CD Updates (#768) 2023-09-05 14:24:04 -07:00
AVR_AVRDx Remove AVR ports from main repo (#394) 2021-09-14 19:25:46 -07:00
AVR_Mega0 Remove AVR ports from main repo (#394) 2021-09-14 19:25:46 -07:00
ColdFire_V2 CI-CD Updates (#768) 2023-09-05 14:24:04 -07:00
CORTUS_APS3 CI-CD Updates (#768) 2023-09-05 14:24:04 -07:00
H8S2329 CI-CD Updates (#768) 2023-09-05 14:24:04 -07:00
HCS12 CI-CD Updates (#768) 2023-09-05 14:24:04 -07:00
IA32_flat CI-CD Updates (#768) 2023-09-05 14:24:04 -07:00
MCF5235 Replace two dashes and one whitespace with their corresponding ASCII characters. (#362) 2021-06-30 15:07:55 -07:00
MicroBlaze CI-CD Updates (#768) 2023-09-05 14:24:04 -07:00
MicroBlazeV8 CI-CD Updates (#768) 2023-09-05 14:24:04 -07:00
MicroBlazeV9 CI-CD Updates (#768) 2023-09-05 14:24:04 -07:00
MSP430F449 CI-CD Updates (#768) 2023-09-05 14:24:04 -07:00
NiosII CI-CD Updates (#768) 2023-09-05 14:24:04 -07:00
PPC405_Xilinx CI-CD Updates (#768) 2023-09-05 14:24:04 -07:00
PPC440_Xilinx CI-CD Updates (#768) 2023-09-05 14:24:04 -07:00
RISC-V CI-CD Updates (#768) 2023-09-05 14:24:04 -07:00
RL78 CI-CD Updates (#768) 2023-09-05 14:24:04 -07:00
RX100 CI-CD Updates (#768) 2023-09-05 14:24:04 -07:00
RX200 CI-CD Updates (#768) 2023-09-05 14:24:04 -07:00
RX600 CI-CD Updates (#768) 2023-09-05 14:24:04 -07:00
RX600v2 CI-CD Updates (#768) 2023-09-05 14:24:04 -07:00
RX700v3_DPFPU CI-CD Updates (#768) 2023-09-05 14:24:04 -07:00
STR75x CI-CD Updates (#768) 2023-09-05 14:24:04 -07:00
TriCore_1782 CI-CD Updates (#768) 2023-09-05 14:24:04 -07:00