mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 05:06:43 +00:00
glibc: add patch to increase TLS alignment to stay compatible with newer Widevine CDM modules Since 4.10.2252.0 a TLS alignment of 64 bytes is used but glibc dlopen is limited to 16 and will end up with: 'cannot allocate memory in static TLS block'
This commit is contained in:
parent
fae592ce2a
commit
9b4b7c7a75
@ -0,0 +1,31 @@
|
|||||||
|
From 61b3b546450ae0a70cb4a57fbb0e0fc47b331370 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Portisch <hugo.portisch@yahoo.de>
|
||||||
|
Date: Sat, 5 Jun 2021 19:41:25 +0200
|
||||||
|
Subject: [PATCH] tls: libwidevinecdm.so: since 4.10.2252.0 has TLS with
|
||||||
|
64-byte alignment Change the max_align to 64U instead 16 to make it possible
|
||||||
|
to use dlopen again. Tests by changing TLS_TCB_ALIGN directly showed up some
|
||||||
|
random crashes. Reverence: https://lkml.org/lkml/2020/7/3/754
|
||||||
|
|
||||||
|
---
|
||||||
|
elf/dl-tls.c | 5 +++++
|
||||||
|
1 file changed, 5 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/elf/dl-tls.c b/elf/dl-tls.c
|
||||||
|
index 9fa62f5d..d8f2f740 100644
|
||||||
|
--- a/elf/dl-tls.c
|
||||||
|
+++ b/elf/dl-tls.c
|
||||||
|
@@ -213,6 +213,11 @@ void
|
||||||
|
_dl_determine_tlsoffset (void)
|
||||||
|
{
|
||||||
|
size_t max_align = TLS_TCB_ALIGN;
|
||||||
|
+ /* libwidevinecdm.so: since 4.10.2252.0 has TLS with 64-byte alignment.
|
||||||
|
+ Since TLS is initialized before audit modules are loaded and slotinfo
|
||||||
|
+ information is available, this is not taken into account below in
|
||||||
|
+ the audit case. */
|
||||||
|
+ max_align = MAX (max_align, 64U);
|
||||||
|
size_t freetop = 0;
|
||||||
|
size_t freebottom = 0;
|
||||||
|
|
||||||
|
--
|
||||||
|
2.31.1
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user