public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/arm/morello/main] TODO(relro): cheri: make __attribute_relro a nop
@ 2022-08-05 19:33 Szabolcs Nagy
  0 siblings, 0 replies; only message in thread
From: Szabolcs Nagy @ 2022-08-05 19:33 UTC (permalink / raw)
  To: glibc-cvs

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.  */


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-08-05 19:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-05 19:33 [glibc/arm/morello/main] TODO(relro): cheri: make __attribute_relro a nop Szabolcs Nagy

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).