aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/mach/hurd
AgeCommit message (Collapse)AuthorFilesLines
2025-03-06htl: Make __pthread_sigmask directly call __sigthreadmaskSamuel Thibault1-0/+2
If no thread was created yet, __pthread_sigstate will not find our ss because self->kernel_thread is still nul, and then change the global sigstate instead of our sigstate! We can directly call __sigthreadmask and skip the (bogus) lookup step.
2025-03-06hurd: Consolidate signal mask changeSamuel Thibault3-103/+87
__pthread_sigstate and __sigprocmask were already the same, except for clear_pending.
2025-03-05Remove dl-procinfo.hAdhemerval Zanella1-1/+0
powerpc was the only architecture with arch-specific hooks for LD_SHOW_AUXV, and with the information moved to ld diagnostics there is no need to keep the _dl_procinfo hook. Checked with a build for all affected ABIs. Reviewed-by: Peter Bergner <bergner@linux.ibm.com>
2025-03-02htl: move pthread_once into libcSamuel Thibault4-2/+4
2025-02-16htl: move pthread_rwlock_init into libc.gfleury4-2/+4
Signed-off-by: gfleury <gfleury@disroot.org> Message-ID: <20250216145434.7089-10-gfleury@disroot.org>
2025-02-16htl: move pthread_rwlock_destroy into libc.gfleury4-2/+4
Signed-off-by: gfleury <gfleury@disroot.org> Message-ID: <20250216145434.7089-9-gfleury@disroot.org>
2025-02-16htl: move pthread_rwlock_{rdlock, timedrdlock, timedwrlock, wrlock, ↵gfleury4-12/+24
clockrdlock, clockwrlock} into libc. Signed-off-by: gfleury <gfleury@disroot.org> Message-ID: <20250216145434.7089-8-gfleury@disroot.org>
2025-02-16htl: move pthread_rwlock_unlock into libc.gfleury4-2/+4
Signed-off-by: gfleury <gfleury@disroot.org> Message-ID: <20250216145434.7089-7-gfleury@disroot.org>
2025-02-16htl: move pthread_rwlock_tryrdlock, pthread_rwlock_trywrlock into libc.gfleury4-4/+8
Signed-off-by: gfleury <gfleury@disroot.org> Message-ID: <20250216145434.7089-6-gfleury@disroot.org>
2025-02-16htl: move pthread_rwlockattr_getpshared, pthread_rwlockattr_setpshared into ↵gfleury4-4/+8
libc. Signed-off-by: gfleury <gfleury@disroot.org> Message-ID: <20250216145434.7089-5-gfleury@disroot.org>
2025-02-16htl: move pthread_rwlockattr_destroy into libc.gfleury4-2/+4
Signed-off-by: gfleury <gfleury@disroot.org> Message-ID: <20250216145434.7089-4-gfleury@disroot.org>
2025-02-16htl: move pthread_rwlockattr_init into libc.gfleury4-2/+4
Signed-off-by: gfleury <gfleury@disroot.org> Message-ID: <20250216145434.7089-3-gfleury@disroot.org>
2025-02-10hurd: Replace char foo[1024] with string_tSamuel Thibault7-7/+7
Like already done in various other places and advised by Roland in https://lists.gnu.org/archive/html/bug-hurd/2012-04/msg00124.html
2025-02-10hurd: Drop useless buffer initialization in ttyname*Samuel Thibault2-2/+0
The RPC stub will write a string anyway.
2025-02-10htl: move pthread_barrier_wait into libc.gfleury4-2/+4
Message-ID: <20250209200108.865599-8-gfleury@disroot.org>
2025-02-10htl: move pthread_barrier_init into libc.gfleury4-2/+4
Message-ID: <20250209200108.865599-7-gfleury@disroot.org>
2025-02-10htl: move pthread_barrier_destroy into libc.gfleury4-2/+4
Message-ID: <20250209200108.865599-6-gfleury@disroot.org>
2025-02-10htl: move pthread_barrierattr_getpshared, pthread_barrierattr_setpshared ↵gfleury4-4/+8
into libc. Message-ID: <20250209200108.865599-5-gfleury@disroot.org>
2025-02-10htl: move pthread_barrierattr_init into libc.gfleury4-2/+4
Message-ID: <20250209200108.865599-4-gfleury@disroot.org>
2025-02-10htl: move pthread_barrierattr_destroy into libc.gfleury4-2/+4
Message-ID: <20250209200108.865599-3-gfleury@disroot.org>
2025-02-01hurd: Use the new __proc_reauthenticate_complete protocolSergey Bugaev1-5/+23
2025-02-01htl: move pthread_setcancelstate into libc.gfleury3-2/+1
sysdeps/pthread/sem_open.c: call pthread_setcancelstate directely since forward declaration is gone on hurd too Message-ID: <20250201080202.494671-1-gfleury@disroot.org>
2025-01-29htl: move pthread_setcanceltype into libc.gfleury3-2/+1
Message-ID: <20250103103750.870897-7-gfleury@disroot.org>
2025-01-29htl: move pthread_mutex_consistent, pthread_mutex_consistent_np into libc.gfleury5-8/+19
Message-ID: <20250103103750.870897-6-gfleury@disroot.org>
2025-01-29htl: move pthread_mutex_destroy into libc.gfleury4-4/+7
Message-ID: <20250103103750.870897-5-gfleury@disroot.org>
2025-01-29htl: move pthread_mutex_getprioceiling, pthread_mutex_setprioceiling into libcgfleury6-8/+24
Message-ID: <20250103103750.870897-4-gfleury@disroot.org>
2025-01-29htl: move pthread_mutex_{lock, unlock, trylock, timedlock, clocklock}gfleury8-24/+34
I haven't exposed _pthread_mutex_lock, _pthread_mutex_trylock and _pthread_mutex_unlock in GLIBC_PRIVATE since there aren't used in any code in libpthread Message-ID: <20250103103750.870897-3-gfleury@disroot.org>
2025-01-29htl: move pthread_mutex_init into libc.gfleury4-4/+7
Message-ID: <20250103103750.870897-2-gfleury@disroot.org>
2025-01-19hurd: Fix EINVAL error on linking to a slash-trailing path [BZ #32569]Samuel Thibault4-7/+23
When the target path finishes with a slash, __file_name_split_at returns an empty file name. We can test for this to refuse doing the link.
2025-01-12hurd: Set _POSIX_MONOTONIC_CLOCK to 200809LSamuel Thibault1-1/+1
Now that CLOCK_MONOTONIC is supported.
2025-01-12hurd: Mark more memory-hungry tests as unsupportedSamuel Thibault1-0/+1
until RLIMIT_AS support gets commited in gnumach.
2025-01-12hurd: Mark more memory-hungry tests as unsupportedSamuel Thibault1-0/+5
until RLIMIT_AS support gets commited in gnumach.
2025-01-12hurd: Mark tst-tls-allocation-failure-static-patched as supportedSamuel Thibault1-3/+0
The failure was not due to RLIMIT_AS but unsupported intentional early abort.
2025-01-12hurd: Cope with signals sent to ourself earlySamuel Thibault1-0/+10
Typically when aborting during initialization, before signals are set up.
2025-01-11hurd: Mark more memory-hungry tests as unsupportedSamuel Thibault1-0/+22
until RLIMIT_AS support gets commited in gnumach.
2025-01-07hurd: Accept null arguments for utimensat pathnameSamuel Thibault1-5/+11
This follows Linux' behavior, making it a replacement for the futimens interface.
2025-01-06hurd: Fix shutdown() errno on non-sockSamuel Thibault1-0/+5
2025-01-02htl: move pthread_mutexattr_setprioceiling, pthread_mutexattr_getprioceiling ↵gfleury6-8/+24
into libc. Message-ID: <20241231134909.1166440-9-gfleury@disroot.org>
2025-01-02htl: move pthread_mutexattr_{setrobust, setrobust_np}, ↵gfleury6-14/+36
pthread_mutexattr_{getrobust, getrobust_np} into libc. Message-ID: <20241231134909.1166440-8-gfleury@disroot.org>
2025-01-02htl: move pthread_mutexattr_setpshared, pthread_mutexattr_getpshared into libc.gfleury6-8/+29
Message-ID: <20241231134909.1166440-7-gfleury@disroot.org>
2025-01-02htl: move pthread_mutexattr_settype, pthread_mutexattr_gettype into libc.gfleury6-7/+22
Message-ID: <20241231134909.1166440-6-gfleury@disroot.org>
2025-01-02htl: move pthread_mutexattr_setprotocol into libc.Samuel Thibault5-4/+13
Message-ID: <20241231134909.1166440-5-gfleury@disroot.org>
2025-01-02htl: move pthread_mutexattr_getprotocol into libc.gfleury5-4/+13
Message-ID: <20241231134909.1166440-4-gfleury@disroot.org>
2025-01-01htl: move pthread_mutexattr_destroy into libc.gfleury5-3/+3
Message-ID: <20241231134909.1166440-3-gfleury@disroot.org>
2025-01-01htl: move pthread_mutexattr_init into libc.gfleury5-2/+3
Message-ID: <20241231134909.1166440-2-gfleury@disroot.org>
2025-01-01bits/socket.h: Update to recent BSD definitionSamuel Thibault1-8/+4
The old BSD 4.4 definition (not used by Linux) was not 64b-proof: the cmsg_data field is supposed to CMSG_ALIGN'ed (as can be also seen in the CMSG_LEN macro). Suggested-by: Diego Nieto Cid <dnietoc@gmail.com>
2025-01-01Update copyright dates with scripts/update-copyrightsPaul Eggert383-383/+383
2024-12-31elf: Do not change stack permission on dlopen/dlmopenAdhemerval Zanella2-1/+2
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-27hurd: Avoid asm statements which returnSamuel Thibault4-61/+78
They are not supposed to change flow control. This fixes miscompilation with gcc 14.2.0 which then drops code, see https://lists.gnu.org/archive/html/bug-hurd/2024-11/msg00145.html
2024-12-22htl: move pthread_cond_timedwait, pthread_cond_clockwait, pthread_cond_wait ↵gfleury4-6/+4
into libc. Message-ID: <20241219203727.669825-9-gfleury@disroot.org>