From 60361945cf7943175274bc4f4cdf842c922dffce Mon Sep 17 00:00:00 2001 From: Jon Mason Date: Wed, 11 Sep 2024 09:14:07 -0400 Subject: [PATCH] arm/musl: work around trusted services error CI test for Trusted Services is failing with the recent musl update. The issue was bisected to an update in musl modifying the behavior of PAGE_SIZE. Revert this change in musl while using trusted-services until a proper solution can be found. Signed-off-by: Jon Mason --- ...non-functional-fix-to-early-dynamic-.patch | 42 +++++++++++++++++++ meta-arm/recipes-core/musl/musl_%.bbappend | 2 + 2 files changed, 44 insertions(+) create mode 100644 meta-arm/recipes-core/musl/files/0001-Revert-ldso-fix-non-functional-fix-to-early-dynamic-.patch create mode 100644 meta-arm/recipes-core/musl/musl_%.bbappend diff --git a/meta-arm/recipes-core/musl/files/0001-Revert-ldso-fix-non-functional-fix-to-early-dynamic-.patch b/meta-arm/recipes-core/musl/files/0001-Revert-ldso-fix-non-functional-fix-to-early-dynamic-.patch new file mode 100644 index 00000000..65d19da5 --- /dev/null +++ b/meta-arm/recipes-core/musl/files/0001-Revert-ldso-fix-non-functional-fix-to-early-dynamic-.patch @@ -0,0 +1,42 @@ +From b91e2227575744a70f05b8b12d2c78b0c651fb86 Mon Sep 17 00:00:00 2001 +From: Jon Mason +Date: Wed, 4 Sep 2024 16:20:45 -0400 +Subject: [PATCH] Revert "ldso: fix non-functional fix to early dynamic + PAGE_SIZE access" + +This reverts commit 6f666231bf51703fadbef10460d462fb573548a1. + +Signed-off-by: Jon Mason +Upstream-Status: Inappropriate +--- + ldso/dynlink.c | 8 +++----- + 1 file changed, 3 insertions(+), 5 deletions(-) + +diff --git a/ldso/dynlink.c b/ldso/dynlink.c +index 3b57c07fabcb..cc90efbd30bf 100644 +--- a/ldso/dynlink.c ++++ b/ldso/dynlink.c +@@ -21,17 +21,15 @@ + #include + #include "pthread_impl.h" + #include "fork_impl.h" +-#include "libc.h" + #include "dynlink.h" + + static size_t ldso_page_size; +-/* libc.h may have defined a macro for dynamic PAGE_SIZE already, but +- * PAGESIZE is only defined if it's constant for the arch. */ +-#ifndef PAGESIZE +-#undef PAGE_SIZE ++#ifndef PAGE_SIZE + #define PAGE_SIZE ldso_page_size + #endif + ++#include "libc.h" ++ + #define malloc __libc_malloc + #define calloc __libc_calloc + #define realloc __libc_realloc +-- +2.39.2 + diff --git a/meta-arm/recipes-core/musl/musl_%.bbappend b/meta-arm/recipes-core/musl/musl_%.bbappend new file mode 100644 index 00000000..3d1cc88b --- /dev/null +++ b/meta-arm/recipes-core/musl/musl_%.bbappend @@ -0,0 +1,2 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/files:" +SRC_URI += "${@bb.utils.contains('MACHINE_FEATURES', 'ts-crypto', 'file://0001-Revert-ldso-fix-non-functional-fix-to-early-dynamic-.patch', '', d)}"