public inbox for
help / color / mirror / Atom feed
From: Szabolcs Nagy <>
Subject: [glibc/arm/morello/main] aarch64: rtld: avoid loading incompatible binaries
Date: Fri,  5 Aug 2022 19:36:56 +0000 (GMT)	[thread overview]
Message-ID: <> (raw);h=6f93421a5f177e382832cf49a5796eadabee32a9

commit 6f93421a5f177e382832cf49a5796eadabee32a9
Author: Szabolcs Nagy <>
Date:   Fri Apr 29 14:02:17 2022 +0100

    aarch64: rtld: avoid loading incompatible binaries
    Prevent lp64 loading purecap binaries.

 sysdeps/aarch64/dl-machine.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sysdeps/aarch64/dl-machine.h b/sysdeps/aarch64/dl-machine.h
index ae8b14425a..f31695aff1 100644
--- a/sysdeps/aarch64/dl-machine.h
+++ b/sysdeps/aarch64/dl-machine.h
@@ -36,7 +36,8 @@
 static inline int __attribute__ ((unused))
 elf_machine_matches_host (const ElfW(Ehdr) *ehdr)
-  return ehdr->e_machine == EM_AARCH64;
+  return ehdr->e_machine == EM_AARCH64
+	 && (ehdr->e_flags & EF_AARCH64_CHERI_PURECAP) == 0;
 /* Return the run-time load address of the shared object.  */

                 reply	other threads:[~2022-08-05 19:36 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:

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

  git send-email \ \ \ \

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