aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/mach
AgeCommit message (Collapse)AuthorFilesLines
4 dayshurd: 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.
9 daysmach: Fix fallthrough warningSamuel Thibault1-1/+1
gcc would not take the /* FALLTHROUGH */ inside the #ifdef
10 dayshurd: Set _POSIX_MONOTONIC_CLOCK to 200809LSamuel Thibault1-1/+1
Now that CLOCK_MONOTONIC is supported.
10 dayshurd: Add CLOCK_MONOTONIC to clock_nanosleepSamuel Thibault1-5/+5
10 daysmach: Add CLOCK_MONOTONIC case in clock_gettime()Zhaoming Luo3-0/+56
The Mach RPC host_get_uptime64() is implemented. It returns the elapsed time value since bootup. See https://git.savannah.gnu.org/cgit/hurd/gnumach.git/commit/?id=fc494bfe3fb6363e1077dc035eb119970d84a9d1 In this patch, the RPC is used to implement the monotonic clock for mach. * config.h.in: Add HAVE_HOST_GET_UPTIME64 config entry * sysdeps/mach/clock_gettime.c: Add CLOCK_MONOTONIC case * sysdeps/mach/configure: Check the existence of host_get_uptime64 RPC * sysdeps/mach/configure.ac: Check the existence of host_get_uptime64 RPC Message-ID: <20250106043907.1046-1-zhmingluo@163.com>
11 dayshurd: Mark more memory-hungry tests as unsupportedSamuel Thibault1-0/+1
until RLIMIT_AS support gets commited in gnumach.
11 dayshurd: Mark more memory-hungry tests as unsupportedSamuel Thibault1-0/+5
until RLIMIT_AS support gets commited in gnumach.
11 dayshurd: 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.
11 dayshurd: Cope with signals sent to ourself earlySamuel Thibault1-0/+10
Typically when aborting during initialization, before signals are set up.
12 dayshurd: 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-07mach: Make clock_nanosleep also check tv_secSamuel Thibault1-0/+1
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 Eggert423-423/+423
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 Thibault5-67/+96
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>
2024-12-22htl: move __pthread_mutex_checklocked into libc.gfleury8-2/+8
move out __getpid from pt-mutex.h and in pt-mutex-* include <unistd.h> where __getpid was called Signed-off-by: gfleury <gfleury@disroot.org> Message-ID: <20241219203727.669825-8-gfleury@disroot.org>
2024-12-22htl: move __pthread_timedblock, __pthread_timedblock_intr, __pthread_block, ↵gfleury2-0/+2
__pthread_block_intr into libc. Signed-off-by: gfleury <gfleury@disroot.org> Message-ID: <20241219203727.669825-7-gfleury@disroot.org>
2024-12-22htl: move pthread_cond_signal into libc.gfleury3-2/+1
Signed-off-by: gfleury <gfleury@disroot.org> Message-ID: <20241219203727.669825-6-gfleury@disroot.org>
2024-12-22htl: move pthread_cond_broadcast into libc.gfleury3-2/+1
Signed-off-by: gfleury <gfleury@disroot.org> Message-ID: <20241219203727.669825-5-gfleury@disroot.org>
2024-12-22htl: move pthread_cond_destroy into libc.gfleury3-2/+1
Signed-off-by: gfleury <gfleury@disroot.org> Message-ID: <20241219203727.669825-4-gfleury@disroot.org>
2024-12-22htl: move __pthread_wakeup into libc.gfleury1-0/+1
Signed-off-by: gfleury <gfleury@disroot.org> Message-ID: <20241219203727.669825-3-gfleury@disroot.org>
2024-12-22htl: move pthread_cond_init into libc.gfleury3-2/+1
Signed-off-by: gfleury <gfleury@disroot.org> Message-ID: <20241219203727.669825-2-gfleury@disroot.org>
2024-12-22hurd: make mprotect translate KERN_PROTECTION_FAILURE to EACCESSSamuel Thibault1-0/+3
Suggested-by: Sergey Bugaev <bugaevc@gmail.com>
2024-12-14htl: move pthread_sigmask into libc.gfleury5-6/+8
Message-ID: <20241212220612.782313-3-gfleury@disroot.org>
2024-12-14htl: move __pthread_sigstate into libc.gfleury1-0/+1
Message-ID: <20241212220612.782313-2-gfleury@disroot.org>
2024-12-14htl: move __pthread_sigstate_destroy into libc.gfleury1-0/+1
Message-ID: <20241212220612.782313-1-gfleury@disroot.org>
2024-12-12Implement C23 atan2piJoseph Myers2-0/+16
C23 adds various <math.h> function families originally defined in TS 18661-4. Add the atan2pi functions (atan2(y,x)/pi). Tested for x86_64 and x86, and with build-many-glibcs.py.
2024-12-11Implement C23 atanpiJoseph Myers2-0/+16
C23 adds various <math.h> function families originally defined in TS 18661-4. Add the atanpi functions (atan(x)/pi). Tested for x86_64 and x86, and with build-many-glibcs.py.
2024-12-10Implement C23 asinpiJoseph Myers2-0/+16
C23 adds various <math.h> function families originally defined in TS 18661-4. Add the asinpi functions (asin(x)/pi). Tested for x86_64 and x86, and with build-many-glibcs.py.
2024-12-09Implement C23 acospiJoseph Myers2-0/+16
C23 adds various <math.h> function families originally defined in TS 18661-4. Add the acospi functions (acos(x)/pi). Tested for x86_64 and x86, and with build-many-glibcs.py.
2024-12-09htl: move pthread_condattr_setpshared into libc.gfleury4-2/+4
Signed-off-by: gfleury <gfleury@disroot.org> Message-ID: <20241126205329.2215295-8-gfleury@disroot.org>
2024-12-09htl: move pthread_condattr_setclock into libc.gfleury4-2/+4
Signed-off-by: gfleury <gfleury@disroot.org> Message-ID: <20241126205329.2215295-7-gfleury@disroot.org>
2024-12-09htl: move pthread_condattr_init into libc.gfleury3-2/+1
Signed-off-by: gfleury <gfleury@disroot.org> Message-ID: <20241126205329.2215295-6-gfleury@disroot.org>
2024-12-09htl: move pthread_condattr_getpshared into libc.gfleury4-2/+4
Signed-off-by: gfleury <gfleury@disroot.org> Message-ID: <20241126205329.2215295-5-gfleury@disroot.org>
2024-12-09htl: move pthread_condattr_getclock into libc.gfleury4-2/+4
Signed-off-by: gfleury <gfleury@disroot.org> Message-ID: <20241126205329.2215295-4-gfleury@disroot.org>
2024-12-09htl: move pthread_condattr_destroy into libc.gfleury3-2/+1
Signed-off-by: gfleury <gfleury@disroot.org> Message-ID: <20241126205329.2215295-2-gfleury@disroot.org>
2024-12-05Implement C23 tanpiJoseph Myers2-0/+16
C23 adds various <math.h> function families originally defined in TS 18661-4. Add the tanpi functions (tan(pi*x)). Tested for x86_64 and x86, and with build-many-glibcs.py.
2024-12-04Implement C23 sinpiJoseph Myers2-0/+16
C23 adds various <math.h> function families originally defined in TS 18661-4. Add the sinpi functions (sin(pi*x)). Tested for x86_64 and x86, and with build-many-glibcs.py.
2024-12-04Implement C23 cospiJoseph Myers2-0/+16
C23 adds various <math.h> function families originally defined in TS 18661-4. Add the cospi functions (cos(pi*x)). Tested for x86_64 and x86, and with build-many-glibcs.py.