aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv
AgeCommit message (Collapse)AuthorFilesLines
6 daysld.so: Decorate BSS mappingsPetr Malat2-12/+41
Decorate BSS mappings with [anon: glibc: .bss <file>], for example [anon: glibc: .bss /lib/libc.so.6]. The string ".bss" is already used by bionic so use the same, but add the filename as well. If the name would be longer than what the kernel allows, drop the directory part of the path. Refactor glibc.mem.decorate_maps check to a separate function and use it to avoid assembling a name, which would not be used later. Signed-off-by: Petr Malat <oss@malat.biz> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
6 daysnptl: Add support for setup guard pages with MADV_GUARD_INSTALLAdhemerval Zanella1-0/+2
Linux 6.13 (662df3e5c3766) added a lightweight way to define guard areas through madvise syscall. Instead of PROT_NONE the guard region through mprotect, userland can madvise the same area with a special flag, and the kernel ensures that accessing the area will trigger a SIGSEGV (as for PROT_NONE mapping). The madvise way has the advantage of less kernel memory consumption for the process page-table (one less VMA per guard area), and slightly less contention on kernel (also due to the fewer VMA areas being tracked). The pthread_create allocates a new thread stack in two ways: if a guard area is set (the default) it allocates the memory range required using PROT_NONE and then mprotect the usable stack area. Otherwise, if a guard page is not set it allocates the region with the required flags. For the MADV_GUARD_INSTALL support, the stack area region is allocated with required flags and then the guard region is installed. If the kernel does not support it, the usual way is used instead (and MADV_GUARD_INSTALL is disabled for future stack creations). The stack allocation strategy is recorded on the pthread struct, and it is used in case the guard region needs to be resized. To avoid needing an extra field, the 'user_stack' is repurposed and renamed to 'stack_mode'. This patch also adds a proper test for the pthread guard. I checked on x86_64, aarch64, powerpc64le, and hppa with kernel 6.13.0-rc7. Reviewed-by: DJ Delorie <dj@redhat.com>
2025-01-21aarch64: Add HWCAP_GCSYury Khrustalev2-4/+1
Use upper 32 bits of HWCAP. Reviewed-by: Andreas K. Huettel <dilfridge@gentoo.org>
2025-01-20Linux: Do not check unused bytes after sched_getattr in tst-sched_setattrFlorian Weimer1-11/+0
Linux 6.13 was released with a change that overwrites those bytes. This means that the check_unused subtest fails. Update the manual accordingly. Tested-by: Xi Ruoyao <xry111@xry111.site> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2025-01-20aarch64: Use __alloc_gcs in makecontextSzabolcs Nagy1-30/+8
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2025-01-20aarch64: Process gnu properties in static exeSzabolcs Nagy1-0/+14
Unlike for BTI, the kernel does not process GCS properties so update GL(dl_aarch64_gcs) before the GCS status is set. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2025-01-20aarch64: Enable GCS in static linked exeSzabolcs Nagy1-0/+48
Use the ARCH_SETUP_TLS hook to enable GCS in the static linked case. The system call must be inlined and then GCS is enabled on a top level stack frame that does not return and has no exception handlers above it. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2025-01-20aarch64: Add glibc.cpu.aarch64_gcs tunableSzabolcs Nagy2-0/+45
This tunable controls Guarded Control Stack (GCS) for the process. 0 = disabled: do not enable GCS 1 = enforced: check markings and fail if any binary is not marked 2 = optional: check markings but keep GCS off if a binary is unmarked 3 = override: enable GCS, markings are ignored By default it is 0, so GCS is disabled, value 1 will enable GCS. The status is stored into GL(dl_aarch64_gcs) early and only applied later, since enabling GCS is tricky: it must happen on a top level stack frame. Using GL instead of GLRO because it may need updates depending on loaded libraries that happen after readonly protection is applied, however library marking based GCS setting is not yet implemented. Describe new tunable in the manual. Co-authored-by: Yury Khrustalev <yury.khrustalev@arm.com> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2025-01-20aarch64: Add GCS support for makecontextSzabolcs Nagy2-2/+63
Changed the makecontext logic: previously the first setcontext jumped straight to the user callback function and the return address is set to __startcontext. This does not work when GCS is enabled as the integrity of the return address is protected, so instead the context is setup such that setcontext jumps to __startcontext which calls the user callback (passed in x20). The map_shadow_stack syscall is used to allocate a suitably sized GCS (which includes some reserved area to account for altstack signal handlers and otherwise supports maximum number of 16 byte aligned stack frames on the given stack) however the GCS is never freed as the lifetime of ucontext and related stack is user managed. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2025-01-20aarch64: Add GCS support for setcontextSzabolcs Nagy4-9/+83
Userspace ucontext needs to store GCSPR, it does not have to be compatible with the kernel ucontext. For now we use the linux struct gcs_context layout but only use the gcspr field from it. Similar implementation to the longjmp code, supports switching GCS if the target GCS is capped, and unwinding a continuous GCS to a previous state. Reviewed-by: Wilco Dijkstra <Wilco.Dijkstra@arm.com> Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2025-01-20aarch64: Add GCS support to vforkSzabolcs Nagy1-1/+6
Reviewed-by: Wilco Dijkstra <Wilco.Dijkstra@arm.com> Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2025-01-16Linux: Add tests that check that TLS and rseq area are separateFlorian Weimer6-0/+213
The new test elf/tst-rseq-tls-range-4096-static reliably detected the extra TLS allocation problem (tcb_offset was dropped from the allocation size) on aarch64. It also failed with a crash in dlopen *before* the extra TLS changes, so TLS alignment with static dlopen was already broken. Reviewed-by: Michael Jeanson <mjeanson@efficios.com>
2025-01-16Linux: Fixes for getrandom fork handlingFlorian Weimer1-3/+23
Careful updates of grnd_alloc.len are required to ensure that after fork, grnd_alloc.states does not contain entries that are also encountered by __getrandom_reset_state in TCBs. For the same reason, it is necessary to overwrite the TCB state pointer with NULL before updating grnd_alloc.states in __getrandom_vdso_release. Before this change, different TCBs could share the same getrandom state after multi-threaded fork. This would be a critical security bug (predictable randomness) if not caught during development. The additional check in stdlib/tst-arc4random-thread makes it more likely that the test fails due to the bugs mentioned above. Both __getrandom_reset_state and __getrandom_vdso_release could put reserved NULL pointers into the states array. This is also fixed with this commit. After these changes, no null pointers were observed in the states array during testing. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2025-01-14affinity-inheritance: Overallocate CPU setsStefan Liebler1-3/+4
Some kernels on S390 appear to return a CPU affinity mask based on configured processors rather than the ones online. Overallocate the CPU set to match that, but operate only on the ones online. Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org> Co-authored-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
2025-01-13sh4: ensure FPSCR.PR==0 when executing FRCHG [BZ #27543]mirabilos3-0/+10
If the bit is not 0, the operations FRCHG and FSCHG are undefined and cause a trap; qemu now checks for this as well, so we set it to 0 temporarily and restore the old value in getcontext afterwards (setcontext/swapcontext already do so). From the discussion in the bugreport, this can probably be optimised in one place but none of the people involved are SH4 assembly experts, this patch is field-tested, and it’s not a code path run often. The other question, what happens if a signal occurs while the bit is temporarily 0, is also still unsolved, but to fix that a kernel change is most likely needed; this patch changes a certain trap on many CPUs for a hard-to-get trap in a signal handler if a signal is delivered during the few instructions the PR bit is temporarily set to 0, so it’s not a regression for most users. See BZ and https://bugs.launchpad.net/qemu/+bug/1796520 for related discussion, references and review comments. Signed-off-by: mirabilos <tg@debian.org> Reviewed-by: Oleg Endo <olegendo@gcc.gnu.org> Tested-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2025-01-13aarch64: Use 64-bit variable to access the special registersAdhemerval Zanella2-2/+2
clang issues: error: value size does not match register size specified by the constraint and modifier [-Werror,-Wasm-operand-widths] while tryng to use 32 bit variables with 'mrs' to get/set the fpsr, dczid_el0, and ctr.
2025-01-10Linux: Update internal copy of '<sys/rseq.h>'Michael Jeanson1-0/+11
Sync the internal copy of '<sys/rseq.h>' with the latest Linux kernel 'include/uapi/linux/rseq.h'. Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Reviewed-by: Florian Weimer <fweimer@redhat.com>
2025-01-10nptl: Move the rseq area to the 'extra TLS' blockMichael Jeanson10-48/+205
Move the rseq area to the newly added 'extra TLS' block, this is the last step in adding support for the rseq extended ABI. The size of the rseq area is now dynamic and depends on the rseq features reported by the kernel through the elf auxiliary vector. This will allow applications to use rseq features past the 32 bytes of the original rseq ABI as they become available in future kernels. Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Reviewed-by: Florian Weimer <fweimer@redhat.com>
2025-01-10nptl: Introduce <rseq-access.h> for RSEQ_* accessorsMichael Jeanson1-0/+8
In preparation to move the rseq area to the 'extra TLS' block, we need accessors based on the thread pointer and the rseq offset. The ONCE variant of the accessors ensures single-copy atomicity for loads and stores which is required for all fields once the registration is active. A separate header is required to allow including <atomic.h> which results in an include loop when added to <tcb-access.h>. Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Reviewed-by: Florian Weimer <fweimer@redhat.com>
2025-01-10nptl: add rtld_hidden_proto to __rseq_size and __rseq_offsetMichael Jeanson2-15/+28
This allows accessing the internal aliases of __rseq_size and __rseq_offset from ld.so without ifdefs and avoids dynamic symbol binding at run time for both variables. Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Reviewed-by: Florian Weimer <fweimer@redhat.com>
2025-01-10Add Linux 'extra TLS'Michael Jeanson1-0/+71
Add the Linux implementation of 'extra TLS' which will allocate space for the rseq area at the end of the TLS blocks in allocation order. Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Reviewed-by: Florian Weimer <fweimer@redhat.com>
2025-01-10nptl: Add rseq auxvalsMichael Jeanson4-5/+39
Get the rseq feature size and alignment requirement from the auxiliary vector for use inside the dynamic loader. Use '__rseq_size' directly to store the feature size. If the main thread registration fails or is disabled by tunable, reset the value to 0. This will be used in the TLS block allocator to compute the size and alignment of the rseq area block for the extended ABI support. Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Reviewed-by: Florian Weimer <fweimer@redhat.com>
2025-01-09tests: Verify inheritance of cpu affinitySiddhesh Poyarekar2-0/+72
Add a couple of tests to verify that CPU affinity set using sched_setaffinity and pthread_setaffinity_np are inherited by a child process and child thread. Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2025-01-08Revert "configure: default to --prefix=/usr on GNU/Linux"DJ Delorie2-7/+2
This reverts commit 81439a116cf48583127ddf1f09809440aa40969a.
2025-01-07elf: Second ld.so relocation only if libc.so has been loadedFlorian Weimer3-0/+36
Commit 8f8dd904c4a2207699bb666f30acceb5209c8d3f (“elf: rtld_multiple_ref is always true”) removed some code that happened to enable compatibility with programs that do not link against libc.so. Such programs cannot call dlopen or any dynamic linker functions (except __tls_get_addr), so this is not really useful. Still ld.so should not crash with a null-pointer dereference or undefined symbol reference in these cases. In the main relocation loop, call _dl_relocate_object unconditionally because it already checks if the object has been relocated. If libc.so was loaded, self-relocate ld.so against it and call __rtld_mutex_init and __rtld_malloc_init_real to activate the full implementations. Those are available only if libc.so is there, so skip these initialization steps if libc.so is absent. Without libc.so, the global scope can be completely empty. This can cause ld.so self-relocation to fail because if it uses symbol-based relocations, which is why the second ld.so self-relocation is not performed if libc.so is missing. The previous concern regarding GOT updates through self-relocation no longer applies because function pointers are updated explicitly through __rtld_mutex_init and __rtld_malloc_init_real, and not through relocation. However, the second ld.so self-relocation is still delayed, in case there are other symbols being used. Fixes commit 8f8dd904c4a2207699bb666f30acceb5209c8d3f (“elf: rtld_multiple_ref is always true”). Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2025-01-03AArch64: Add vector tanpi routinesJoe Ramsay1-0/+5
Vector variant of the new C23 tanpi. New tests pass on AArch64.
2025-01-03AArch64: Add vector cospi routinesJoe Ramsay1-0/+5
Vector variant of the new C23 cospi. New tests pass on AArch64.
2025-01-03AArch64: Add vector sinpi to libmvecJoe Ramsay1-0/+5
Vector variant of the new C23 sinpi. New tests pass on AArch64.
2025-01-04Rename have-mtls-descriptor to have-test-mtls-descriptorH.J. Lu1-1/+1
Since have-mtls-descriptor is only used for glibc testing, rename it to have-test-mtls-descriptor. Also enable tst-gnu2-tls2-amx only if $(have-test-mtls-descriptor) == gnu2. Tested with GCC 14 and Clang 19/18/17 on x86-64. Signed-off-by: H.J. Lu <hjl.tools@gmail.com> Reviewed-by: Sam James <sam@gentoo.org>
2025-01-03not-cancel.h: Support testing fortify build with ClangH.J. Lu1-5/+5
When Clang is used to test fortify glibc build configured with --enable-fortify-source=N clang issues errors like In file included from tst-rfc3484.c:60: In file included from ./getaddrinfo.c:81: ../sysdeps/unix/sysv/linux/not-cancel.h:36:10: error: reference to overloaded function could not be resolved; did you mean to call it? 36 | __typeof (open64) __open64_nocancel; | ^~~~~~~~ ../include/bits/../../io/bits/fcntl2.h:127:1: note: possible target for call 127 | open64 (__fortify_clang_overload_arg (const char *, ,__path), int __oflag, | ^ ../include/bits/../../io/bits/fcntl2.h:118:1: note: possible target for call 118 | open64 (__fortify_clang_overload_arg (const char *, ,__path), int __oflag) | ^ ../include/bits/../../io/bits/fcntl2.h:114:1: note: possible target for call 114 | open64 (const char *__path, int __oflag, mode_t __mode, ...) | ^ ../io/fcntl.h:219:12: note: possible target for call 219 | extern int open64 (const char *__file, int __oflag, ...) __nonnull ((1)); | ^ because clang fortify support for functions with variable arguments relies on function overload. Update not-cancel.h to avoid __typeof on functions with variable arguments. Co-Authored-By: Adhemerval Zanella <adhemerval.zanella@linaro.org> Signed-off-by: H.J. Lu <hjl.tools@gmail.com> Reviewed-by: Sam James <sam@gentoo.org>
2025-01-02mlock, mlock2, munlock: Use __attr_access_none macroSam James1-1/+1
This fixes build failures using GCC 7.5.0 against glibc headers, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118194#c5. Followup to 013106ae677af9836614ace1a01d25b63fa555a7. Reported-by: vvinayag@arm.com
2025-01-01Update copyright in generated files by running "make"Paul Eggert1-0/+0
2025-01-01Update copyright dates with scripts/update-copyrightsPaul Eggert1582-1582/+1582
2025-01-01mlock, mlock2, munlock: Tell the compiler we don't dereference the pointerXi Ruoyao1-1/+2
Since https://gcc.gnu.org/r11-959, the compiler emits -Wmaybe-uninitialized if a const pointer to an uninitialized buffer is passed. Tell the compiler we don't dereference the pointer to remove the false alarm. Link: https://gcc.gnu.org/PR118194 Signed-off-by: Xi Ruoyao <xry111@xry111.site> Reviewed-by: Sam James <sam@gentoo.org>
2024-12-31elf: Do not change stack permission on dlopen/dlmopenAdhemerval Zanella3-68/+9
If some shared library loaded with dlopen/dlmopen requires an executable stack, either implicitly because of a missing GNU_STACK ELF header (where the ABI default flags implies in the executable bit) or explicitly because of the executable bit from GNU_STACK; the loader will try to set the both the main thread and all thread stacks (from the pthread cache) as executable. Besides the issue where any __nptl_change_stack_perm failure does not undo the previous executable transition (meaning that if the library fails to load, there can be thread stacks with executable stacks), this behavior was used on a CVE [1] as a vector for RCE. This patch changes that if a shared library requires an executable stack, and the current stack is not executable, dlopen fails. The change is done only for dynamically loaded modules, if the program or any dependency requires an executable stack, the loader will still change the main thread before program execution and any thread created with default stack configuration. [1] https://www.qualys.com/2023/07/19/cve-2023-38408/rce-openssh-forwarded-ssh-agent.txt Checked on x86_64-linux-gnu and i686-linux-gnu. Reviewed-by: Florian Weimer <fweimer@redhat.com>
2024-12-30x86-64: Reorder dynamic linker list in ldd script (bug 32508)Florian Weimer1-1/+1
Move the x86-64 loader first, before the i386 and x32 loaders. In most cases, it's the loader the script needs. This avoids an error message if the i386 loader does not work. The effect of this change to the generated ldd script looks like this: -RTLDLIST="/lib/ld-linux.so.2 /lib64/ld-linux-x86-64.so.2 /libx32/ld-linux-x32.so.2" +RTLDLIST="/lib64/ld-linux-x86-64.so.2 /lib/ld-linux.so.2 /libx32/ld-linux-x32.so.2" Reviewed-by: Sam James <sam@gentoo.org>
2024-12-23include/sys/cdefs.h: Add __attribute_optimization_barrier__Adhemerval Zanella4-4/+4
Add __attribute_optimization_barrier__ to disable inlining and cloning on a function. For Clang, expand it to __attribute__ ((optnone)) Otherwise, expand it to __attribute__ ((noinline, clone)) Co-Authored-By: H.J. Lu <hjl.tools@gmail.com> Reviewed-by: Sam James <sam@gentoo.org>
2024-12-22hppa: Simplify handling of sanity check errors in clone.S.John David Anglin1-6/+5
This simplifies the handling of sanity check errors in clone.S. Adjusted a couple of comments to reflect current code. Signed-off-by: John David Anglin <dave.anglin@bell.net>
2024-12-22hppa: add cacheflush() syscall wrapperJohn David Anglin5-0/+46
The hppa Linux kernel supports the cacheflush() syscall since version 6.5. This adds the glibc syscall wrapper. Signed-off-by: Helge Deller <deller@gmx.de> --- v2: This patch was too late in release cycle for GLIBC_2.40, so update now to GLIBC_2.41 instead.
2024-12-22dirent: Remove variable length array structure for tst-getdents64.cAdhemerval Zanella1-11/+7
Clang emits the following warnings: ../sysdeps/unix/sysv/linux/tst-getdents64.c:111:18: error: fields must have a constant size: 'variable length array in structure' extension will never be supported char buffer[buffer_size]; ^ Co-Authored-By: H.J. Lu <hjl.tools@gmail.com> Reviewed-by: Sam James <sam@gentoo.org>
2024-12-20Add F_CREATED_QUERY from Linux 6.12 to bits/fcntl-linux.hJoseph Myers1-0/+1
Linux 6.12 adds a new constant F_CREATED_QUERY. Add it to glibc's bits/fcntl-linux.h. Tested for x86_64.
2024-12-20Add HWCAP_LOONGARCH_LSPW from Linux 6.12 to bits/hwcap.hJoseph Myers1-0/+1
Add the new Linux 6.12 HWCAP_LOONGARCH_LSPW to the corresponding bits/hwcap.h. Tested with build-many-glibcs.py for loongarch64-linux-gnu-lp64d.
2024-12-20Add MSG_SOCK_DEVMEM from Linux 6.12 to bits/socket.hJoseph Myers1-0/+2
Linux 6.12 adds a constant MSG_SOCK_DEVMEM (recall that various constants such as this one are defined in the non-uapi linux/socket.h but still form part of the kernel/userspace interface, so that non-uapi header is one that needs checking each release for new such constants). Add it to glibc's bits/socket.h. Tested for x86_64.
2024-12-19Linux: Accept null arguments for utimensat pathnameFlorian Weimer1-3/+0
This matches kernel behavior. With this change, it is possible to use utimensat as a replacement for the futimens interface, similar to what glibc does internally. Reviewed-by: Paul Eggert <eggert@cs.ucla.edu>
2024-12-19Add SCHED_EXT from Linux 6.12 to bits/sched.hJoseph Myers2-1/+2
Linux 6.12 adds the SCHED_EXT constant. Add it to glibc's bits/sched.h and update the kernel version in tst-sched-consts.py. Tested for x86_64.
2024-12-19hppa: Fix strace detach-vfork testJohn David Anglin2-47/+64
This change implements vfork.S for direct support of the vfork syscall. clone.S is revised to correct child support for the vfork case. The main bug was creating a frame prior to the clone syscall. This was done to allow the rp and r4 registers to be saved and restored from the stack frame. r4 was used to save and restore the PIC register, r19, across the system call and the call to set errno. But in the vfork case, it is undefined behavior for the child to return from the function in which vfork was called. It is surprising that this usually worked. Syscalls on hppa save and restore rp and r19, so we don't need to create a frame prior to the clone syscall. We only need a frame when __syscall_error is called. We also don't need to save and restore r19 around the call to $$dyncall as r19 is not used in the code after $$dyncall. This considerably simplifies clone.S. Signed-off-by: John David Anglin <dave.anglin@bell.net>
2024-12-19Update kernel version to 6.12 in header constant testsJoseph Myers3-4/+4
There are no new constants covered by tst-mman-consts.py, tst-mount-consts.py or tst-pidfd-consts.py in Linux 6.12 that need any header changes, so update the kernel version in those tests. (tst-sched-consts.py will need updating separately along with adding SCHED_EXT.) Tested with build-many-glibcs.py.
2024-12-18Update syscall lists for Linux 6.12Joseph Myers1-2/+2
Linux 6.12 has no new syscalls. Update the version number in syscall-names.list to reflect that it is still current for 6.12. Tested with build-many-glibcs.py.
2024-12-18sys/platform/x86.h: Do not depend on _Bool definition in C++ modeH.J. Lu1-1/+1
Clang does not define _Bool for -std=c++98: /usr/include/bits/platform/features.h:31:19: error: unknown type name '_Bool' 31 | static __inline__ _Bool | ^ Change _Bool to bool to silence clang++ error. Signed-off-by: H.J. Lu <hjl.tools@gmail.com> Reviewed-by: Florian Weimer <fweimer@redhat.com>
2024-12-18tst-clone3[-internal].c: Add _Atomic to silence ClangH.J. Lu2-4/+4
Add _Atomic to futex_wait argument and ctid in tst-clone3[-internal].c to silence Clang error: ../sysdeps/unix/sysv/linux/tst-clone3-internal.c:93:3: error: address argument to atomic operation must be a pointer to _Atomic type ('pid_t *' (aka 'int *') invalid) 93 | wait_tid (&ctid, CTID_INIT_VAL); | ^ ~~~~~ ../sysdeps/unix/sysv/linux/tst-clone3-internal.c:51:21: note: expanded from macro 'wait_tid' 51 | while ((__tid = atomic_load_explicit (ctid_ptr, \ | ^ ~~~~~~~~ /usr/bin/../lib/clang/19/include/stdatomic.h:145:30: note: expanded from macro 'atomic_load_explicit' 145 | #define atomic_load_explicit __c11_atomic_load | ^ Signed-off-by: H.J. Lu <hjl.tools@gmail.com> Reviewed-by: Sam James <sam@gentoo.org>