Skip to contentSkip to conversation

arm/musl: work around trusted services error

PATCH New Jon Mason 1 participant 1 message Sep 11, 2024

lore
Share & tools
lore

Jon Mason

author
#0 lore raw

PATCH 1/1 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.

---
 ...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
meta-arm/recipes-core/musl/files/0001-Revert-ldso-fix-non-functional-fix-to-early-dynamic-.patch new file +42 -0
new file mode 100644
index 000000000000..65d19da58989
@@ -0,0 +1,42 @@
+From b91e2227575744a70f05b8b12d2c78b0c651fb86 Mon Sep 17 00:00:00 2001
+From: Jon Mason <[email protected]>
+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 <[email protected]>
+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 <sys/membarrier.h>
+ #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
+
meta-arm/recipes-core/musl/musl_%.bbappend new file +2 -0
new file mode 100644
index 000000000000..3d1cc88b0bc2
@@ -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)}"
Signature · 1 line
2.39.3 (Apple Git-146)