From e3a362b1d1e41bcc02c02f3ef05f4d3b30cbbc17 Mon Sep 17 00:00:00 2001 From: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com> Date: Mon, 7 Jul 2025 05:45:46 -0700 Subject: [PATCH 1/5] Add artifact backup action (#1290) --- .github/workflows/auto-release.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/auto-release.yml b/.github/workflows/auto-release.yml index 3477f6591..19f6c0167 100644 --- a/.github/workflows/auto-release.yml +++ b/.github/workflows/auto-release.yml @@ -18,6 +18,8 @@ on: jobs: release-packager: + permissions: + id-token: write name: Release Packager runs-on: ubuntu-latest steps: @@ -117,6 +119,14 @@ jobs: ./tools/.github/scripts/release.py "$REPO_OWNER" --kernel-repo-path=local_kernel --kernel-commit="$COMMIT_SHA_2" --new-kernel-version="$VERSION_NUMBER" --new-kernel-main-br-version="$MAIN_BR_VERSION_NUMBER" exit $? + - name: Backup Release Asset + uses: FreeRTOS/CI-CD-Github-Actions/artifact-backup@main + with: + # This is dependent on the release script putting this zip file + # in this exact location. + artifact_path: ./tools/.github/scripts/FreeRTOS-KernelV${{ github.event.inputs.version_number }}.zip + release_tag: ${{ github.event.inputs.version_number }} + - name: Cleanup env: VERSION_NUMBER: ${{ github.event.inputs.version_number }} From 48a4939c9f86aee414042962a1776dd99a09348f Mon Sep 17 00:00:00 2001 From: Florian La Roche Date: Wed, 9 Jul 2025 07:46:00 +0200 Subject: [PATCH 2/5] Fix compiler warning (#1291) - In list.h fix a typo in comments. - In portable/ThirdParty/GCC/Posix/port.c fix compiler warning about "gcc -Wwrite-strings". Signed-off-by: Florian La Roche Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com> --- include/list.h | 2 +- portable/ThirdParty/GCC/Posix/port.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/list.h b/include/list.h index b64450c72..b6e0d34f4 100644 --- a/include/list.h +++ b/include/list.h @@ -44,7 +44,7 @@ * * In addition to it's value, each list item contains a pointer to the next * item in the list (pxNext), a pointer to the list it is in (pxContainer) - * and a pointer to back to the object that contains it. These later two + * and a pointer back to the object that contains it. These later two * pointers are included for efficiency of list manipulation. There is * effectively a two way link between the object containing the list item and * the list item itself. diff --git a/portable/ThirdParty/GCC/Posix/port.c b/portable/ThirdParty/GCC/Posix/port.c index b5a4a1b62..d0b81dc1e 100644 --- a/portable/ThirdParty/GCC/Posix/port.c +++ b/portable/ThirdParty/GCC/Posix/port.c @@ -193,7 +193,7 @@ void prvFatalError( const char * pcCall, } /*-----------------------------------------------------------*/ -static void prvPortSetCurrentThreadName( char * pxThreadName ) +static void prvPortSetCurrentThreadName( const char * pxThreadName ) { #ifdef __APPLE__ pthread_setname_np( pxThreadName ); From f5e6151b1433227ca0afe2e1ec6cca6b31b7014c Mon Sep 17 00:00:00 2001 From: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com> Date: Wed, 9 Jul 2025 09:53:13 -0700 Subject: [PATCH 3/5] Update artifact path in the backup action (#1292) * Add artifact backup action * Fix artifact path --- .github/workflows/auto-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/auto-release.yml b/.github/workflows/auto-release.yml index 19f6c0167..2cd6fde6e 100644 --- a/.github/workflows/auto-release.yml +++ b/.github/workflows/auto-release.yml @@ -124,7 +124,7 @@ jobs: with: # This is dependent on the release script putting this zip file # in this exact location. - artifact_path: ./tools/.github/scripts/FreeRTOS-KernelV${{ github.event.inputs.version_number }}.zip + artifact_path: ./FreeRTOS-KernelV${{ github.event.inputs.version_number }}.zip release_tag: ${{ github.event.inputs.version_number }} - name: Cleanup From 684b34ca8db0de1277b9b5359e0d1d822b53b6a2 Mon Sep 17 00:00:00 2001 From: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com> Date: Mon, 14 Jul 2025 16:20:18 +0530 Subject: [PATCH 4/5] Define security extension configs before portable.h (#1294) Define configENABLE_PAC and configENABLE_BTI before including portable.h to prevent "used before definition" warnings when these macros are not set in FreeRTOSConfig.h. Fixes: https://github.com/FreeRTOS/FreeRTOS-Kernel/issues/1293 Signed-off-by: Gaurav Aggarwal --- include/FreeRTOS.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/include/FreeRTOS.h b/include/FreeRTOS.h index ce8530e7d..63e2feb51 100644 --- a/include/FreeRTOS.h +++ b/include/FreeRTOS.h @@ -101,6 +101,16 @@ #define configASSERT_DEFINED 1 #endif +/* Set configENABLE_PAC and/or configENABLE_BTI to 1 to enable PAC and/or BTI + * support and 0 to disable them. These are currently used in ARMv8.1-M ports. */ +#ifndef configENABLE_PAC + #define configENABLE_PAC 0 +#endif + +#ifndef configENABLE_BTI + #define configENABLE_BTI 0 +#endif + /* Basic FreeRTOS definitions. */ #include "projdefs.h" @@ -3040,16 +3050,6 @@ #define configCONTROL_INFINITE_LOOP() #endif -/* Set configENABLE_PAC and/or configENABLE_BTI to 1 to enable PAC and/or BTI - * support and 0 to disable them. These are currently used in ARMv8.1-M ports. */ -#ifndef configENABLE_PAC - #define configENABLE_PAC 0 -#endif - -#ifndef configENABLE_BTI - #define configENABLE_BTI 0 -#endif - /* Sometimes the FreeRTOSConfig.h settings only allow a task to be created using * dynamically allocated RAM, in which case when any task is deleted it is known * that both the task's stack and TCB need to be freed. Sometimes the From 32e581636f66504daa1a76afcc766be2a4b8a9de Mon Sep 17 00:00:00 2001 From: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com> Date: Thu, 24 Jul 2025 11:07:27 +0530 Subject: [PATCH 5/5] Delete thread key on process exit (#1297) Previously, the shared thread key was deleted in xPortStartScheduler after scheduler was ended. This created a race condition where prvThreadKeyDestructor (responsible for freeing thread-specific heap memory) would not be called if xPortStartScheduler deleted the key before the last task deletion, as destructors are not invoked after key deletion (see https://github.com/walac/glibc/blob/master/nptl/pthread_create.c#L145-L150). Move thread key deletion to process exit to ensure all thread-specific memory is properly freed. Signed-off-by: Gaurav Aggarwal --- portable/ThirdParty/GCC/Posix/port.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/portable/ThirdParty/GCC/Posix/port.c b/portable/ThirdParty/GCC/Posix/port.c index d0b81dc1e..2342f6034 100644 --- a/portable/ThirdParty/GCC/Posix/port.c +++ b/portable/ThirdParty/GCC/Posix/port.c @@ -140,6 +140,8 @@ static void prvThreadKeyDestructor( void * pvData ) static void prvInitThreadKey( void ) { pthread_key_create( &xThreadKey, prvThreadKeyDestructor ); + /* Destroy xThreadKey when the process exits. */ + atexit( prvDestroyThreadKey ); } /*-----------------------------------------------------------*/ @@ -315,8 +317,6 @@ BaseType_t xPortStartScheduler( void ) /* Restore original signal mask. */ ( void ) pthread_sigmask( SIG_SETMASK, &xSchedulerOriginalSignalMask, NULL ); - prvDestroyThreadKey(); - return 0; } /*-----------------------------------------------------------*/