bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH glibc 13/34] x86-64: Disable prefer_map_32bit_exec tunabl


From: Sergey Bugaev
Subject: Re: [RFC PATCH glibc 13/34] x86-64: Disable prefer_map_32bit_exec tunable on non-Linux
Date: Mon, 3 Apr 2023 13:10:40 +0300

On Mon, Apr 3, 2023 at 2:09 AM Samuel Thibault <samuel.thibault@gnu.org> wrote:
> Sergey Bugaev, le dim. 19 mars 2023 18:09:56 +0300, a ecrit:
> > While we could/should implement MAP_32BIT for the Hurd port by setting
> > all the high bits of mask in a vm_map () call, neither MAP_32BIT nor
> > glibc.cpu.prefer_map_32bit_exec exist on the Hurd as of now. Compile
> > this code out to fix build failures.
>
> Rather use defined(MAP_32BIT)? That way it will nicely work for BSD
> ports as well, and when hurd eventually supports MAP_32BIT.

Not really. What breaks compilation here is not missing MAP_32BIT, but
rather the undefined set_prefer_map_32bit_exec tunable. It is defined
declaratively in sysdeps/unix/sysv/linux/x86_64/64/dl-tunables.list
(see commit 317f1c0a8a71a862b1e600ff5386b08e02cf4b95); so as-is, it
really is x86_64 Linux specific.

Is there some way to check if a specific tunable is defined, like #if
HAVE_TUNABLE (prefer_map_32bit_exec)? AFAICS the generated
dl-tunable-list.h defines the C enum members, but not any checkable
preprocessor macros.

Alternatively: maybe this part of cpu-features.c should be moved into
sysdeps/unix/sysv/linux/x86_64/64/cpu-features.c and #include_next the
common cpu-features.c?

Sergey



reply via email to

[Prev in Thread] Current Thread [Next in Thread]