glibc:azanella/bz31664-openat2

Last commit made on 2024-04-23
Get this branch:
git clone -b azanella/bz31664-openat2 https://git.launchpad.net/glibc

Branch merges

Branch information

Name:
azanella/bz31664-openat2
Repository:
lp:glibc

Recent commits

921efb1... by Adhemerval Zanella

linux: Add openat2 (BZ 31664)

It was added on Linux 5.6, as an extension of openat. Different
than other open-like function, the kernel only provides the LFS
variant (so files larger than 4GB always succeed, as other functions
with offset larget than off_t). Similar to other open function,
the new symbol is a cancellable entrypoint.

The testcase added only stress some of the syscall provided
functionalities and it is based on existent kernel selftest. Since
the prototype does not use variadic arguments, there is no need to
add fortify wrapper to catch wrong usages.

Checked on x86_64-linux-gnu.

f472484... by Florian Weimer

nptl: Fix tst-cancel30 on kernels without ppoll_time64 support

Fall back to ppoll if ppoll_time64 fails with ENOSYS.
Fixes commit 370da8a121c3ba9eeb2f13da15fc0f21f4136b25 ("nptl: Fix
tst-cancel30 on sparc64").

Reviewed-by: Adhemerval Zanella <email address hidden>

16c8dfb... by Samuel thibault

Revert "Allow glibc to be compiled without EXEC_PAGESIZE"

This reverts commit 49aa652db810ebdca3a662ebd5b0468bd08ec688.

This is still being discussed.

684fbab... by Carlos-0

locale: Handle loading a missing locale twice (Bug 14247)

Delay setting file->decided until the data has been successfully loaded
by _nl_load_locale(). If the function fails to load the data then we
must return and error and leave decided untouched to allow the caller to
attempt to load the data again at a later time. We should not set
decided to 1 early in the function since doing so may prevent attempting
to load it again. We want to try loading it again because that allows an
open to fail and set errno correctly.

On the other side of this problem is that if we are called again with
the same inputs we will fetch the cached version of the object and carry
out no open syscalls and that fails to set errno so we must set errno to
ENOENT in that case. There is a second code path that has to be handled
where the name of the locale matches but the codeset doesn't match.

These changes ensure that errno is correctly set on failure in all the
return paths in _nl_find_locale().

Adds tst-locale-loadlocale to cover the bug.

No regressions on x86_64.

Co-authored-by: Jeff Law <email address hidden>
Reviewed-by: Adhemerval Zanella <email address hidden>

25b191f... by Adhemerval Zanella

elf: Do not check for loader mmap on tst-decorate-maps (BZ 31553)

On some architectures and depending on the page size, the loader can
also allocate some memory during dependencies loading and it will be
marked as 'loader malloc'. However, if the system page size is
large enough, the initial data page will be enough for all required
allocation and there will be no extra loader mmap. To avoid false
negatives, the test does not check for such pages.

Checked on powerpc64le-linux-gnu with 64k pagesize.
Reviewed-by: Simon Chopin <email address hidden>

f6d18be... by Joseph Myers <email address hidden>

Use --enable-obsolete in build-many-glibcs.py for nios2-linux-gnu

Until GCC removes Nios II support (at which point we should do so as
well), this is now needed for GCC 14 / mainline to build for
nios2-linux-gnu target.

Tested with build-many-glibcs.py (GCC mainline) for nios2-linux-gnu.

5361ad3... by Florian Weimer

login: Use unsigned 32-bit types for seconds-since-epoch

These fields store timestamps when the system was running. No Linux
systems existed before 1970, so these values are unused. Switching
to unsigned types allows continued use of the existing struct layouts
beyond the year 2038.

The intent is to give distributions more time to switch to improved
interfaces that also avoid locking/data corruption issues.

Reviewed-by: Adhemerval Zanella <email address hidden>

9abdae9... by Florian Weimer

login: structs utmp, utmpx, lastlog _TIME_BITS independence (bug 30701)

These structs describe file formats under /var/log, and should not
depend on the definition of _TIME_BITS. This is achieved by
defining __WORDSIZE_TIME64_COMPAT32 to 1 on 32-bit ports that
support 32-bit time_t values (where __time_t is 32 bits).

Reviewed-by: Adhemerval Zanella <email address hidden>

4d4da5a... by Florian Weimer

login: Check default sizes of structs utmp, utmpx, lastlog

The default <utmp-size.h> is for ports with a 64-bit time_t.
Ports with a 32-bit time_t or with __WORDSIZE_TIME64_COMPAT32=1
need to override it.

Reviewed-by: Adhemerval Zanella <email address hidden>

0997c3d... by Wilco Dijkstra <email address hidden>

benchtests: Add random() benchmark

Add a simple benchmark to measure the overhead of internal libc locks in
the random() implementation on both single- and multi-threaded cases.
This relies on the implementation of random using internal locks to
access shared global data, and that the runtime uses multi-threaded
locking once a thread has been created (even after it finishes).

Reviewed-by: Adhemerval Zanella <email address hidden>