glibc/sysdeps/mach/hurd/i386
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
..
bits Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
htl [hurd] Fix i686 build breakage caused by 4fedebc911 2023-02-17 11:21:28 +01:00
____longjmp_chk.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
__longjmp.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
c++-types.data hurd: Add c++-types expected result 2016-03-20 22:16:34 +01:00
dl-tls-initialized.c hurd: Only check for TLS initialization inside rtld or in static builds 2023-04-10 23:33:30 +02:00
getcontext.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
Implies hurd: Add hurd thread library 2018-04-02 01:44:14 +02:00
intr-msg.h hurd: Remove the ecx kludge 2023-03-02 00:32:55 +01:00
ld.abilist Fix glibc 2.34 ABI omission (missing GLIBC_2.34 in dynamic loader) 2022-01-27 18:52:05 +01:00
libanl.abilist Ignore absolute symbols in ABI tests. 2018-05-04 15:46:32 +00:00
libBrokenLocale.abilist Ignore absolute symbols in ABI tests. 2018-05-04 15:46:32 +00:00
libc_malloc_debug.abilist Move malloc_{g,s}et_state to libc_malloc_debug 2021-07-22 18:38:10 +05:30
libc.abilist htl: move pthread_self info libc. 2023-04-05 01:26:36 +02:00
libcrypt.abilist Ignore absolute symbols in ABI tests. 2018-05-04 15:46:32 +00:00
libdl.abilist dlfcn: Move dlopen into libc 2021-06-03 08:26:04 +02:00
libm.abilist math: Remove the error handling wrapper from hypot and hypotf 2021-12-13 10:08:46 -03:00
libnsl.abilist Ignore absolute symbols in ABI tests. 2018-05-04 15:46:32 +00:00
libpthread.abilist htl: move pthread_self info libc. 2023-04-05 01:26:36 +02:00
libresolv.abilist resolv: Move res_query functions into libc 2021-07-19 07:56:57 +02:00
librt.abilist rt: Move shm_unlink into libc 2021-06-21 08:25:15 +02:00
libutil.abilist login: Move libutil into libc 2021-06-30 08:43:37 +02:00
localplt.data elf: Rework exception handling in the dynamic loader [BZ #25486] 2022-11-03 09:39:31 +01:00
longjmp-ts.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
makecontext.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
Makefile hurd: Move some i386 bits to x86 2023-02-02 00:27:26 +01:00
setcontext.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
sigcontextinfo.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
sigreturn.c hurd: Improve reply port handling when exiting signal handlers 2023-04-10 23:54:28 +02:00
static-start.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
swapcontext.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tls.h hurd: Only check for TLS initialization inside rtld or in static builds 2023-04-10 23:33:30 +02:00
tlsdesc.sym hurd: Add tlsdesc.sym 2018-01-30 00:52:48 +01:00
ucontext_i.sym hurd: Add getcontext, makecontext, setcontext, swapcontext 2019-12-29 16:54:08 +01:00
Versions Add missing symbols to Version files 2021-06-02 07:32:19 +02:00
vm_param.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00