public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Szabolcs Nagy <nsz@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc/arm/morello/main] TODO(relro): cheri: make __attribute_relro a nop
Date: Fri,  5 Aug 2022 19:33:23 +0000 (GMT)	[thread overview]
Message-ID: <20220805193323.7E1A13857355@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=347f7e2ac1f34f92bc382afe9e5fe32ebe7cf16c

commit 347f7e2ac1f34f92bc382afe9e5fe32ebe7cf16c
Author: Szabolcs Nagy <szabolcs.nagy@arm.com>
Date:   Thu Jun 10 16:10:15 2021 +0100

    TODO(relro): cheri: make __attribute_relro a nop
    
    relro does not work in the libc, because capabilities are readonly
    even before the page protection is applied.

Diff:
---
 include/libc-symbols.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index f4437ff6ad..1a7df359fd 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -426,8 +426,12 @@ for linking")
 
 #define attribute_tls_model_ie __attribute__ ((tls_model ("initial-exec")))
 
+#if defined __CHERI_PURE_CAPABILITY__
+/* avoid readonly caps at startup when relro has to be writable */
+#define attribute_relro
+#else
 #define attribute_relro __attribute__ ((section (".data.rel.ro")))
-
+#endif
 
 /* Used to disable stack protection in sensitive places, like ifunc
    resolvers and early static TLS init.  */


                 reply	other threads:[~2022-08-05 19:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220805193323.7E1A13857355@sourceware.org \
    --to=nsz@sourceware.org \
    --cc=glibc-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).