public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/arm/morello/main] aarch64: elf: avoid loading incompatible binaries
@ 2022-11-23 14:47 Szabolcs Nagy
0 siblings, 0 replies; 3+ messages in thread
From: Szabolcs Nagy @ 2022-11-23 14:47 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=c14096c2d31897465acf062bfe8ce2ebc510b866
commit c14096c2d31897465acf062bfe8ce2ebc510b866
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. */
^ permalink raw reply [flat|nested] 3+ messages in thread
* [glibc/arm/morello/main] aarch64: elf: avoid loading incompatible binaries
@ 2022-10-27 13:58 Szabolcs Nagy
0 siblings, 0 replies; 3+ messages in thread
From: Szabolcs Nagy @ 2022-10-27 13:58 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=73d195966deacbd30a7c62ad922b66dfba804ccc
commit 73d195966deacbd30a7c62ad922b66dfba804ccc
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. */
^ permalink raw reply [flat|nested] 3+ messages in thread
* [glibc/arm/morello/main] aarch64: elf: avoid loading incompatible binaries
@ 2022-10-26 15:19 Szabolcs Nagy
0 siblings, 0 replies; 3+ messages in thread
From: Szabolcs Nagy @ 2022-10-26 15:19 UTC (permalink / raw)
To: glibc-cvs
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. */
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-11-23 14:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-23 14:47 [glibc/arm/morello/main] aarch64: elf: avoid loading incompatible binaries Szabolcs Nagy
-- strict thread matches above, loose matches on Subject: below --
2022-10-27 13:58 Szabolcs Nagy
2022-10-26 15:19 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).