public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] hurd: Disable Prefer_MAP_32BIT_EXEC on non-x86_64 for now
@ 2024-03-23 22:16 Samuel Thibault
0 siblings, 0 replies; only message in thread
From: Samuel Thibault @ 2024-03-23 22:16 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=6afeac1289b92bc893613cc9efc9b5c692369e64
commit 6afeac1289b92bc893613cc9efc9b5c692369e64
Author: Sergey Bugaev <bugaevc@gmail.com>
Date: Sat Mar 23 20:32:45 2024 +0300
hurd: Disable Prefer_MAP_32BIT_EXEC on non-x86_64 for now
While we could support it on any architecture, the tunable is currently
only defined on x86_64.
Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
Message-ID: <20240323173301.151066-5-bugaevc@gmail.com>
Diff:
---
sysdeps/mach/hurd/dl-sysdep.c | 2 +-
sysdeps/mach/hurd/mmap.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/sysdeps/mach/hurd/dl-sysdep.c b/sysdeps/mach/hurd/dl-sysdep.c
index 43129a1e74..6ba00e413d 100644
--- a/sysdeps/mach/hurd/dl-sysdep.c
+++ b/sysdeps/mach/hurd/dl-sysdep.c
@@ -457,7 +457,7 @@ __mmap (void *addr, size_t len, int prot, int flags, int fd, off_t offset)
if (prot & PROT_EXEC)
vmprot |= VM_PROT_EXECUTE;
-#ifdef __LP64__
+#ifdef __x86_64__
if ((addr == NULL) && (prot & PROT_EXEC)
&& HAS_ARCH_FEATURE (Prefer_MAP_32BIT_EXEC))
flags |= MAP_32BIT;
diff --git a/sysdeps/mach/hurd/mmap.c b/sysdeps/mach/hurd/mmap.c
index 7b94561015..30e369f067 100644
--- a/sysdeps/mach/hurd/mmap.c
+++ b/sysdeps/mach/hurd/mmap.c
@@ -60,7 +60,7 @@ __mmap (void *addr, size_t len, int prot, int flags, int fd, off_t offset)
copy = ! (flags & MAP_SHARED);
anywhere = ! (flags & MAP_FIXED);
-#ifdef __LP64__
+#ifdef __x86_64__
if ((addr == NULL) && (prot & PROT_EXEC)
&& HAS_ARCH_FEATURE (Prefer_MAP_32BIT_EXEC))
flags |= MAP_32BIT;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-03-23 22:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-23 22:16 [glibc] hurd: Disable Prefer_MAP_32BIT_EXEC on non-x86_64 for now Samuel Thibault
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).