glibc:master

Last commit made on 2024-03-25
Get this branch:
git clone -b master https://git.launchpad.net/glibc

Branch merges

Branch information

Name:
master
Repository:
lp:glibc

Recent commits

96d1b9a... by Palmer Dabbelt

RISC-V: Fix the static-PIE non-relocated object check

The value of l_scope is only valid post relocation, so this original
check was triggering undefined behavior. Instead just directly check to
see if the object has been relocated, at which point using l_scope is
safe.

Reported-by: Andreas Schwab <email address hidden>
Closes: BZ #31317
Fixes: e0590f41fe ("RISC-V: Enable static-pie.")
Signed-off-by: Palmer Dabbelt <email address hidden>

dc1a772... by Sergey Bugaev <email address hidden>

htl: Implement some support for TLS_DTV_AT_TP

Signed-off-by: Sergey Bugaev <email address hidden>
Message-ID: <email address hidden>

a4273ef... by Sergey Bugaev <email address hidden>

htl: Respect GL(dl_stack_flags) when allocating stacks

Previously, HTL would always allocate non-executable stacks. This has
never been noticed, since GNU Mach on x86 ignores VM_PROT_EXECUTE and
makes all pages implicitly executable. Since GNU Mach on AArch64
supports non-executable pages, HTL forgetting to pass VM_PROT_EXECUTE
immediately breaks any code that (unfortunately, still) relies on
executable stacks.

Signed-off-by: Sergey Bugaev <email address hidden>
Message-ID: <email address hidden>

b467cfc... by Sergey Bugaev <email address hidden>

hurd: Use the RETURN_ADDRESS macro

This gives us PAC stripping on AArch64.

Signed-off-by: Sergey Bugaev <email address hidden>
Message-ID: <email address hidden>

6afeac1... by Sergey Bugaev <email address hidden>

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 <email address hidden>
Message-ID: <email address hidden>

49aa652... by Sergey Bugaev <email address hidden>

Allow glibc to be compiled without EXEC_PAGESIZE

We would like to avoid statically defining any specific page size on
aarch64-gnu, and instead make sure that everything uses the dynamic
page size, available via vm_page_size and GLRO(dl_pagesize).

There are currently a few places in glibc that require EXEC_PAGESIZE
to be defined. Per Roland's suggestion [0], drop the static
GLRO(dl_pagesize) initializers (for now, only if EXEC_PAGESIZE is not
defined), and don't require EXEC_PAGESIZE definition for libio to
enable mmap usage.

[0]: https://mail.gnu.org/archive/html/bug-hurd/2011-10/msg00035.html

Signed-off-by: Sergey Bugaev <email address hidden>
Message-ID: <email address hidden>

4648bfb... by Sergey Bugaev <email address hidden>

hurd: Stop relying on VM_MAX_ADDRESS

We'd like to avoid committing to a specific size of virtual address
space (i.e. the value of VM_AARCH64_T0SZ) on AArch64. While the current
version of GNU Mach still exports VM_MAX_ADDRESS for compatibility, we
should try to avoid relying on it when we can. This piece of logic in
_hurdsig_getenv () doesn't actually care about the size of user-
accessible virtual address space, it just wants to preempt faults on any
addresses starting from the value of the P pointer and above. So, use
(unsigned long int) -1 instead of VM_MAX_ADDRESS.

While at it, change the casts to (unsigned long int) and not just
(long int), since the type of struct hurd_signal_preemptor.{first,last}
is unsigned long int.

Signed-off-by: Sergey Bugaev <email address hidden>
Message-ID: <email address hidden>

7f02511... by Sergey Bugaev <email address hidden>

hurd: Move internal functions to internal header

Move _hurd_self_sigstate (), _hurd_critical_section_lock (), and
_hurd_critical_section_unlock () inline implementations (that were
already guarded by #if defined _LIBC) to the internal version of the
header. While at it, add <tls.h> to the includes, and use
__LIBC_NO_TLS () unconditionally.

Signed-off-by: Sergey Bugaev <email address hidden>
Message-ID: <email address hidden>

4a13b3e... by Stafford Horne <email address hidden>

stdlib: Fix tst-makecontext2 log when swapcontext fails

The log incorrectly prints, setcontext failed. Update this to indicate
that actually swapcontext failed.

Signed-off-by: Stafford Horne <email address hidden>
Reviewed-by: H.J. Lu <email address hidden>

ad05a42... by Stafford Horne <email address hidden>

or1k: Add prctl wrapper to unwrap variadic args

On OpenRISC variadic functions and regular functions have different
calling conventions so this wrapper is needed to translate. This
wrapper is copied from x86_64/x32. I don't know the build system enough
to find a cleaner way to share the code between x86_64/x32 and or1k
(maybe Implies?), so I went with the straight copy.

This fixes test failures:

  misc/tst-prctl
  nptl/tst-setgetname