From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1944) id 41D3F384D1BD; Thu, 20 Oct 2022 17:21:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 41D3F384D1BD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666286478; bh=dZZhxVaFXRU/wiqfidKPz/x4eHJ8TOXitgraseJV5yQ=; h=From:To:Subject:Date:From; b=BG58rIODa8Ck4EdIZ4jpqcb6ILcK3akJoYZsS8BOzBUKZSJAUUbjTiOWaw7CeCIzr WBSysTKREv62z+T367JFNTAKv8EMgLFntGDGG6Nm2tuQ2V5ZM69Ni0yDiQG3o2hyQD 0UV3I8dCXolWqwYTwR6w4sVL+JBuwSlVquAbNFXM= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Szabolcs Nagy To: glibc-cvs@sourceware.org Subject: [glibc/arm/morello/main] cheri: Update the static tls requirement of the libc X-Act-Checkin: glibc X-Git-Author: Szabolcs Nagy X-Git-Refname: refs/heads/arm/morello/main X-Git-Oldrev: 4ad4ea848b335d803bcf4754a1cea78f697eaec5 X-Git-Newrev: 78412dcc6a173726a3db78c8a0626aec2f1dd42a Message-Id: <20221020172118.41D3F384D1BD@sourceware.org> Date: Thu, 20 Oct 2022 17:21:18 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=78412dcc6a173726a3db78c8a0626aec2f1dd42a commit 78412dcc6a173726a3db78c8a0626aec2f1dd42a Author: Szabolcs Nagy Date: Tue Oct 18 15:10:03 2022 +0100 cheri: Update the static tls requirement of the libc Larger requirement because pointers are bigger. Diff: --- elf/dl-tls.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/elf/dl-tls.c b/elf/dl-tls.c index 093cdddb7e..1b90bf17b3 100644 --- a/elf/dl-tls.c +++ b/elf/dl-tls.c @@ -62,7 +62,11 @@ observed PT_GNU_TLS sizes across all architectures. Some architectures have lower values due to differences in type sizes and link editor capabilities. */ +#ifdef __CHERI_PURE_CAPABILITY__ +#define LIBC_IE_TLS 256 +#else #define LIBC_IE_TLS 144 +#endif /* Size of initial-exec TLS in libraries other than libc.so. This should be large enough to cover runtime libraries of the @@ -87,7 +91,11 @@ tls_static_surplus (int nns, int opt_tls) the computation of dl_tls_static_surplus in _dl_tls_static_surplus_init yields the historic value 1664, for backwards compatibility. */ +#ifdef __CHERI_PURE_CAPABILITY__ +#define LEGACY_TLS 0 +#else #define LEGACY_TLS (1664 - tls_static_surplus (DEFAULT_NNS, OPTIONAL_TLS)) +#endif /* Calculate the size of the static TLS surplus, when the given number of audit modules are loaded. Must be called after the