Merge branch 'main' into fix/doxygen-defgroup-duplicates

This commit is contained in:
hanzhijian 2026-06-30 09:36:29 +08:00 committed by GitHub
commit f8a8c97a46
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 61 additions and 11 deletions

10
.github/SECURITY.md vendored
View file

@ -1,3 +1,13 @@
## Threat model
Before reporting an issue, please review the FreeRTOS kernel threat model. It
describes the security assumptions the kernel makes, which threats are in scope,
and the protections the kernel does and does not provide. Understanding these
boundaries helps determine whether an observed behavior is a security
vulnerability or expected, documented behavior.
- [FreeRTOS Kernel Threat Model](https://www.freertos.org/Security/02-Kernel-threat-model)
## Reporting a Vulnerability
If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security

View file

@ -1050,7 +1050,7 @@ UBaseType_t uxTaskPriorityGetFromISR( const TaskHandle_t xTask ) PRIVILEGED_FUNC
*
* @return The base priority of xTask.
*
* \defgroup uxTaskPriorityGet uxTaskBasePriorityGet
* \defgroup uxTaskBasePriorityGet uxTaskBasePriorityGet
* \ingroup TaskCtrl
*/
UBaseType_t uxTaskBasePriorityGet( const TaskHandle_t xTask ) PRIVILEGED_FUNCTION;

View file

@ -55,9 +55,19 @@
#define portNVIC_SYSTICK_CLK ( 0 )
#endif
/* Unprivileged critical sections are not supported when using MPU wrappers
* version 2. Default the option to 0 and reject an explicit value of 1. */
#ifndef configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS
#warning "configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS is not defined. We recommend defining it to 0 in FreeRTOSConfig.h for better security."
#define configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS 1
#if ( configUSE_MPU_WRAPPERS_V1 == 0 )
#define configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS 0
#else
#warning "configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS is not defined. We recommend defining it to 0 in FreeRTOSConfig.h for better security."
#define configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS 1
#endif
#else
#if ( ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS == 1 ) )
#error configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS is not supported with MPU wrappers version 2 ( configUSE_MPU_WRAPPERS_V1 == 0 ).
#endif
#endif
/* Prototype of all Interrupt Service Routines (ISRs). */

View file

@ -59,9 +59,19 @@
#define portNVIC_SYSTICK_CLK ( 0 )
#endif
/* Unprivileged critical sections are not supported when using MPU wrappers
* version 2. Default the option to 0 and reject an explicit value of 1. */
#ifndef configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS
#warning "configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS is not defined. We recommend defining it to 0 in FreeRTOSConfig.h for better security."
#define configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS 1
#if ( configUSE_MPU_WRAPPERS_V1 == 0 )
#define configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS 0
#else
#warning "configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS is not defined. We recommend defining it to 0 in FreeRTOSConfig.h for better security."
#define configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS 1
#endif
#else
#if ( ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS == 1 ) )
#error configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS is not supported with MPU wrappers version 2 ( configUSE_MPU_WRAPPERS_V1 == 0 ).
#endif
#endif
/* Prototype of all Interrupt Service Routines (ISRs). */

View file

@ -66,9 +66,19 @@
#define portNVIC_SYSTICK_CLK_BIT ( 0 )
#endif
/* Unprivileged critical sections are not supported when using MPU wrappers
* version 2. Default the option to 0 and reject an explicit value of 1. */
#ifndef configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS
#warning "configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS is not defined. We recommend defining it to 0 in FreeRTOSConfig.h for better security."
#define configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS 1
#if ( configUSE_MPU_WRAPPERS_V1 == 0 )
#define configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS 0
#else
#warning "configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS is not defined. We recommend defining it to 0 in FreeRTOSConfig.h for better security."
#define configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS 1
#endif
#else
#if ( ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS == 1 ) )
#error configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS is not supported with MPU wrappers version 2 ( configUSE_MPU_WRAPPERS_V1 == 0 ).
#endif
#endif
/* Prototype of all Interrupt Service Routines (ISRs). */

View file

@ -48,9 +48,19 @@
#undef MPU_WRAPPERS_INCLUDED_FROM_API_FILE
/* Unprivileged critical sections are not supported when using MPU wrappers
* version 2. Default the option to 0 and reject an explicit value of 1. */
#ifndef configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS
#warning "configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS is not defined. We recommend defining it to 0 in FreeRTOSConfig.h for better security."
#define configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS 1
#if ( configUSE_MPU_WRAPPERS_V1 == 0 )
#define configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS 0
#else
#warning "configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS is not defined. We recommend defining it to 0 in FreeRTOSConfig.h for better security."
#define configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS 1
#endif
#else
#if ( ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS == 1 ) )
#error configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS is not supported with MPU wrappers version 2 ( configUSE_MPU_WRAPPERS_V1 == 0 ).
#endif
#endif
/* Prototype of all Interrupt Service Routines (ISRs). */

View file

@ -7362,7 +7362,7 @@ STATIC void prvResetNextTaskUnblockTime( void )
/* MISRA Ref 11.5.1 [Malloc memory assignment] */
/* More details at: https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/main/MISRA.md#rule-115 */
/* coverity[misra_c_2012_rule_11_5_violation] */
pxTaskStatusArray = pvPortMalloc( uxCurrentNumberOfTasks * sizeof( TaskStatus_t ) );
pxTaskStatusArray = pvPortMalloc( uxArraySize * sizeof( TaskStatus_t ) );
if( pxTaskStatusArray != NULL )
{
@ -7531,7 +7531,7 @@ STATIC void prvResetNextTaskUnblockTime( void )
/* MISRA Ref 11.5.1 [Malloc memory assignment] */
/* More details at: https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/main/MISRA.md#rule-115 */
/* coverity[misra_c_2012_rule_11_5_violation] */
pxTaskStatusArray = pvPortMalloc( uxCurrentNumberOfTasks * sizeof( TaskStatus_t ) );
pxTaskStatusArray = pvPortMalloc( uxArraySize * sizeof( TaskStatus_t ) );
if( pxTaskStatusArray != NULL )
{