glibc/sysdeps
Sergey Bugaev 747812349d hurd: Improve reply port handling when exiting signal handlers
If we're doing signals, that means we've already got the signal thread
running, and that implies TLS having been set up. So we know that
__hurd_local_reply_port will resolve to THREAD_SELF->reply_port, and can
access that directly using the THREAD_GETMEM and THREAD_SETMEM macros.
This avoids potential miscompilations, and should also be a tiny bit
faster.

Also, use mach_port_mod_refs () and not mach_port_destroy () to destroy
the receive right. mach_port_destroy () should *never* be used on
mach_task_self (); this can easily lead to port use-after-free
vulnerabilities if the task has any other references to the same port.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
Message-Id: <20230319151017.531737-26-bugaevc@gmail.com>
2023-04-10 23:54:28 +02:00
..
aarch64 aarch64: update libm test ulps 2023-02-24 10:55:38 +00:00
alpha alpha: Remove strncmp optimization 2023-03-02 16:41:43 -03:00
arc ARC:fpu: add extra capability check before use of sqrt and fma builtins 2023-02-17 16:17:58 -03:00
arm Update arm libm-tests-ulps 2023-03-30 10:50:50 -03:00
csky C-SKY: Strip hard float abi from hard float feature. 2023-02-07 16:34:24 +08:00
generic elf: Stop including tls.h in ldsodefs.h 2023-04-10 23:26:28 +02:00
gnu Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
hppa hppa: Update struct __pthread_rwlock_arch_t comment. 2023-04-05 18:54:47 +00:00
htl htl: move pthread_self info libc. 2023-04-05 01:26:36 +02:00
hurd Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
i386 math: Remove the error handling wrapper from fmod and fmodf 2023-04-03 16:45:27 -03:00
ia64 ia64: Regenerate ulps 2023-01-24 11:21:38 -05:00
ieee754 math: Remove the error handling wrapper from fmod and fmodf 2023-04-03 16:45:27 -03:00
loongarch LoongArch: Add get_rounding_mode. 2023-03-13 09:20:42 +08:00
m68k math: Remove the error handling wrapper from fmod and fmodf 2023-04-03 16:45:27 -03:00
mach hurd: Improve reply port handling when exiting signal handlers 2023-04-10 23:54:28 +02:00
microblaze Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
mips Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
nios2 Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
nptl Remove --enable-tunables configure option 2023-03-29 14:33:06 -03:00
or1k Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
posix system: Add "--" after "-c" for sh (BZ #28519) 2023-03-28 10:12:30 -03:00
powerpc powerpc: Disable stack protector in early static initialization 2023-04-03 17:42:08 -03:00
pthread nptl: Fix tst-cancel30 on sparc64 2023-04-03 17:41:59 -03:00
riscv riscv: Add string-fza.h and string-fzi.h 2023-02-06 16:19:35 -03:00
s390 Remove --enable-tunables configure option 2023-03-29 14:33:06 -03:00
sh sh: Add string-fzb.h 2023-02-06 16:19:35 -03:00
sparc Remove --enable-tunables configure option 2023-03-29 14:33:06 -03:00
unix hppa: Revise __TIMESIZE define to use __WORDSIZE 2023-04-05 18:35:38 +00:00
wordsize-32 Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
wordsize-64 C2x strtol binary constant handling 2023-02-16 23:02:40 +00:00
x86 <sys/platform/x86.h>: Add PREFETCHI support 2023-04-05 14:46:10 -07:00
x86_64 hurd: Add sys/ucontext.h and sigcontext.h for x86_64 2023-04-10 20:11:43 +02:00