aboutsummaryrefslogtreecommitdiff
path: root/pwd
diff options
context:
space:
mode:
authorSergey Bugaev <bugaevc@gmail.com>2023-03-19 18:10:08 +0300
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2023-04-10 23:54:28 +0200
commit747812349d42427c835aeac987aa67641d84f1ad (patch)
treee9391fe71f0f029218155bb38bac64838b8df7fb /pwd
parentb37899d34d2190ef4b454283188f22519f096048 (diff)
downloadglibc-747812349d42427c835aeac987aa67641d84f1ad.tar
glibc-747812349d42427c835aeac987aa67641d84f1ad.tar.gz
glibc-747812349d42427c835aeac987aa67641d84f1ad.tar.bz2
glibc-747812349d42427c835aeac987aa67641d84f1ad.zip
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>
Diffstat (limited to 'pwd')
0 files changed, 0 insertions, 0 deletions