Linux cpanel.rrshost.in 5.15.0-25-generic #25-Ubuntu SMP Wed Mar 30 15:54:22 UTC 2022 x86_64
Apache
: 109.123.238.221 | : 108.162.216.125
128 Domain
8.2.28
aev999
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
src /
glibc /
debian /
patches /
hurd-i386 /
[ HOME SHELL ]
Name
Size
Permission
Action
git-SEM_VALUE_MAX.diff
600
B
-rw-r--r--
git-WAIT.diff
1.44
KB
-rw-r--r--
git-barrier-1.diff
694
B
-rw-r--r--
git-bsd4.3-ioctls.diff
873
B
-rw-r--r--
git-clock-cputime.diff
2.86
KB
-rw-r--r--
git-cond_destroy.diff
6.02
KB
-rw-r--r--
git-cthreads-symbols.diff
1.03
KB
-rw-r--r--
git-cthreads.diff
21.02
KB
-rw-r--r--
git-fexecve.diff
1.2
KB
-rw-r--r--
git-fix-longjmp.diff
3.03
KB
-rw-r--r--
git-fork-pthread_exit.diff
1.23
KB
-rw-r--r--
git-futex-internal.diff
1.82
KB
-rw-r--r--
git-holes.diff
1.42
KB
-rw-r--r--
git-hurd-version.diff
1.02
KB
-rw-r--r--
git-hurdsig-SA_SIGINFO.diff
20.64
KB
-rw-r--r--
git-intr-msg-unwind.diff
1.23
KB
-rw-r--r--
git-ld-library-path-checks.dif...
3.57
KB
-rw-r--r--
git-libc-open.diff
970
B
-rw-r--r--
git-libpthread-nodelete.diff
771
B
-rw-r--r--
git-libpthread-testcancel.diff
1.21
KB
-rw-r--r--
git-libpthread_plt.diff
1.24
KB
-rw-r--r--
git-libpthread_syms.diff
4.68
KB
-rw-r--r--
git-lll-initializer.diff
3.15
KB
-rw-r--r--
git-lll-private.diff
611
B
-rw-r--r--
git-lll-ptr.diff
19.54
KB
-rw-r--r--
git-lll-wait-intr.diff
5.41
KB
-rw-r--r--
git-longjmp-onstack.diff
9.07
KB
-rw-r--r--
git-mmap-EINVAL.diff
668
B
-rw-r--r--
git-mmap_addr.diff
1.43
KB
-rw-r--r--
git-posix_openpt.diff
2.71
KB
-rw-r--r--
git-pselect.diff
5.72
KB
-rw-r--r--
git-pthread_atfork-hidden.diff
1.9
KB
-rw-r--r--
git-pthread_get_cleanup_stack....
2.43
KB
-rw-r--r--
git-pthread_link_tests.diff
1.86
KB
-rw-r--r--
git-pthread_self.diff
1.16
KB
-rw-r--r--
git-raise.diff
1.08
KB
-rw-r--r--
git-register-atfork.diff
7.98
KB
-rw-r--r--
git-register-atfork2.diff
1.1
KB
-rw-r--r--
git-sbrk-end.diff
5.13
KB
-rw-r--r--
git-sched_sets.diff
3.13
KB
-rw-r--r--
git-sem-intr.diff
4.85
KB
-rw-r--r--
git-sem-open-init.diff
2.51
KB
-rw-r--r--
git-sem-open.diff
31.92
KB
-rw-r--r--
git-sem-pshared.diff
15.5
KB
-rw-r--r--
git-siginfo_uesp.diff
811
B
-rw-r--r--
git-sigstate_thread_reference....
3.71
KB
-rw-r--r--
git-spin_lock.diff
829
B
-rw-r--r--
git-ss_init.diff
1.15
KB
-rw-r--r--
git-strtol-test.diff
1.47
KB
-rw-r--r--
git-tiocflush.diff
976
B
-rw-r--r--
git-trunc-times.diff
1.13
KB
-rw-r--r--
git-tst-udp.diff
3.43
KB
-rw-r--r--
git-waitid.diff
5.65
KB
-rw-r--r--
local-ED.diff
1.21
KB
-rw-r--r--
local-clock_gettime_MONOTONIC....
3.38
KB
-rw-r--r--
local-disable-ioctls.diff
1.53
KB
-rw-r--r--
local-enable-ldconfig.diff
1.15
KB
-rw-r--r--
local-exec_filename.diff
4.35
KB
-rw-r--r--
local-fix-nss.diff
1.37
KB
-rw-r--r--
local-mach_print.diff
658
B
-rw-r--r--
local-madvise_warn.diff
553
B
-rw-r--r--
local-no-bootstrap-fs-access.d...
786
B
-rw-r--r--
local-no_unsupported_ioctls.di...
2.14
KB
-rw-r--r--
local-tls-ie-align.diff
1.08
KB
-rw-r--r--
local-usr.diff
593
B
-rw-r--r--
submitted-AF_LINK.diff
1.08
KB
-rw-r--r--
submitted-bind_umask2.diff
1.65
KB
-rw-r--r--
submitted-net.diff
81.49
KB
-rw-r--r--
submitted-path_mounted.diff
1.41
KB
-rw-r--r--
sysvshm-lll.diff
532
B
-rw-r--r--
tg-EGREGIOUS-fr.diff
794
B
-rw-r--r--
tg-EIEIO-fr.diff
805
B
-rw-r--r--
tg-bigmem.diff
1.42
KB
-rw-r--r--
tg-bits_atomic.h_multiple_thre...
11.56
KB
-rw-r--r--
tg-bootstrap.diff
775
B
-rw-r--r--
tg-eintr.diff
786
B
-rw-r--r--
tg-glibc-2.24-restore-malloc-h...
548
B
-rw-r--r--
tg-hooks.diff
2.49
KB
-rw-r--r--
tg-ifaddrs_v6.diff
10.71
KB
-rw-r--r--
tg-libc_rwlock_recursive.diff
3.61
KB
-rw-r--r--
tg-mach-hurd-link.diff
987
B
-rw-r--r--
tg-sendmsg-SCM_CREDS.diff
8.03
KB
-rw-r--r--
tg-sysvshm.diff
21.62
KB
-rw-r--r--
tg-thread-cancel.diff
2.81
KB
-rw-r--r--
tg-unlockpt-chroot.diff
741
B
-rw-r--r--
unsubmitted-clock_t_centisecon...
1.79
KB
-rw-r--r--
unsubmitted-getaux_at_secure.d...
637
B
-rw-r--r--
unsubmitted-mremap.diff
838
B
-rw-r--r--
unsubmitted-prof-eintr.diff
668
B
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : git-pselect.diff
Committed for glibc 2.32 commit f9011787497a276f84ef79ae233992692a626dc7 Author: Samuel Thibault <samuel.thibault@ens-lyon.org> Date: Wed May 27 23:42:24 2020 +0000 hurd: Fix pselect atomicity In case the signal arrives before the __mach_msg call, we need to catch between the sigprocmask call and the __mach_msg call. Let's just reuse the support for sigsuspend to make the signal send a message that our __mach_msg call will just receive. * hurd/hurdselect.c (_hurd_select): Add sigport and ss variables. When sigmask is not NULL, create a sigport port and register as ss->suspended. Add it to the portset. When we receive a message on it, set error to EINTR. Clean up sigport and portset appropriately. * hurd/hurdsig.c (wake_sigsuspend): Note that pselect also uses it. diff --git a/hurd/hurdselect.c b/hurd/hurdselect.c index b140dab6c3..69a415c02c 100644 --- a/hurd/hurdselect.c +++ b/hurd/hurdselect.c @@ -48,7 +48,7 @@ _hurd_select (int nfds, const struct timespec *timeout, const sigset_t *sigmask) { int i; - mach_port_t portset; + mach_port_t portset, sigport; int got, ready; error_t err; fd_set rfds, wfds, xfds; @@ -66,6 +66,7 @@ _hurd_select (int nfds, int error; } d[nfds]; sigset_t oset; + struct hurd_sigstate *ss; union typeword /* Use this to avoid unkosher casts. */ { @@ -115,8 +116,30 @@ _hurd_select (int nfds, reply_msgid = IO_SELECT_TIMEOUT_REPLY_MSGID; } - if (sigmask && __sigprocmask (SIG_SETMASK, sigmask, &oset)) - return -1; + if (sigmask) + { + /* Add a port to the portset for the case when we get the signal even + before calling __mach_msg. */ + + sigport = __mach_reply_port (); + + ss = _hurd_self_sigstate (); + _hurd_sigstate_lock (ss); + /* And tell the signal thread to message us when a signal arrives. */ + ss->suspended = sigport; + _hurd_sigstate_unlock (ss); + + if (__sigprocmask (SIG_SETMASK, sigmask, &oset)) + { + _hurd_sigstate_lock (ss); + ss->suspended = MACH_PORT_NULL; + _hurd_sigstate_unlock (ss); + __mach_port_destroy (__mach_task_self (), sigport); + return -1; + } + } + else + sigport = MACH_PORT_NULL; if (pollfds) { @@ -188,6 +211,8 @@ _hurd_select (int nfds, d[i].io_port); __mutex_unlock (&_hurd_dtable_lock); HURD_CRITICAL_END; + if (sigmask) + __sigprocmask (SIG_SETMASK, &oset, NULL); errno = err; return -1; } @@ -277,9 +302,14 @@ _hurd_select (int nfds, /* Send them all io_select request messages. */ if (firstfd == -1) - /* But not if there were no ports to deal with at all. - We are just a pure timeout. */ - portset = __mach_reply_port (); + { + if (sigport == MACH_PORT_NULL) + /* But not if there were no ports to deal with at all. + We are just a pure timeout. */ + portset = __mach_reply_port (); + else + portset = sigport; + } else { portset = MACH_PORT_NULL; @@ -298,7 +328,7 @@ _hurd_select (int nfds, ts, type); if (!err) { - if (firstfd == lastfd) + if (firstfd == lastfd && sigport == MACH_PORT_NULL) /* When there's a single descriptor, we don't need a portset, so just pretend we have one, but really use the single reply port. */ @@ -329,6 +359,16 @@ _hurd_select (int nfds, } _hurd_port_free (&d[i].cell->port, &d[i].ulink, d[i].io_port); } + + if (got == 0 && sigport != MACH_PORT_NULL) + { + if (portset == MACH_PORT_NULL) + /* Create the portset to receive the signal message on. */ + __mach_port_allocate (__mach_task_self (), MACH_PORT_RIGHT_PORT_SET, + &portset); + /* Put the signal reply port in the port set. */ + __mach_port_move_member (__mach_task_self (), sigport, portset); + } } /* GOT is the number of replies (or errors), while READY is the number of @@ -404,6 +444,16 @@ _hurd_select (int nfds, { MACH_MSG_TYPE_INTEGER_T, sizeof (integer_t) * 8, 1, 1, 0, 0 } }; #endif + + if (sigport != MACH_PORT_NULL && sigport == msg.head.msgh_local_port) + { + /* We actually got interrupted by a signal before + __mach_msg; poll for further responses and then + return quickly. */ + err = EINTR; + goto poll; + } + if (msg.head.msgh_id == reply_msgid && msg.head.msgh_size >= sizeof msg.error && !(msg.head.msgh_bits & MACH_MSGH_BITS_COMPLEX) @@ -492,7 +542,17 @@ _hurd_select (int nfds, for (i = firstfd; i <= lastfd; ++i) if (d[i].reply_port != MACH_PORT_NULL) __mach_port_destroy (__mach_task_self (), d[i].reply_port); - if (firstfd == -1 || (firstfd != lastfd && portset != MACH_PORT_NULL)) + + if (sigport != MACH_PORT_NULL) + { + _hurd_sigstate_lock (ss); + ss->suspended = MACH_PORT_NULL; + _hurd_sigstate_unlock (ss); + __mach_port_destroy (__mach_task_self (), sigport); + } + + if ((firstfd == -1 && sigport == MACH_PORT_NULL) + || ((firstfd != lastfd || sigport != MACH_PORT_NULL) && portset != MACH_PORT_NULL)) /* Destroy PORTSET, but only if it's not actually the reply port for a single descriptor (in which case it's destroyed in the previous loop; not doing it here is just a bit more efficient). */ diff --git a/hurd/hurdsig.c b/hurd/hurdsig.c index a2741bb7c8..4d819d9af2 100644 --- a/hurd/hurdsig.c +++ b/hurd/hurdsig.c @@ -564,8 +564,8 @@ abort_all_rpcs (int signo, struct machine_thread_all_state *state, int live) } } -/* Wake up any sigsuspend call that is blocking SS->thread. SS must be - locked. */ +/* Wake up any sigsuspend or pselect call that is blocking SS->thread. SS must + be locked. */ static void wake_sigsuspend (struct hurd_sigstate *ss) {
Close