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] aarch64: elf: avoid loading incompatible binaries Date: Wed, 26 Oct 2022 15:19:34 +0000 (GMT) [thread overview] Message-ID: <20221026151934.389DD388302C@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=be17e8b5fb37550d3b6ce373d6c74b5409a0833c commit be17e8b5fb37550d3b6ce373d6c74b5409a0833c Author: Szabolcs Nagy <szabolcs.nagy@arm.com> Date: Fri Apr 29 14:02:17 2022 +0100 aarch64: elf: avoid loading incompatible binaries Prevent lp64 ld.so loading purecap binaries. Diff: --- 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. */
next reply other threads:[~2022-10-26 15:19 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-10-26 15:19 Szabolcs Nagy [this message] 2022-10-27 13:58 Szabolcs Nagy 2022-11-23 14:47 Szabolcs Nagy
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=20221026151934.389DD388302C@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: linkBe 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).