Package: glibc / 2.27-3

Metadata

Package Version Patches format
glibc 2.27-3 3.0 (quilt)

Patch series

view the series file
Patch File delta Description
git updates.diff | (download)

ChangeLog | 211 211 + 0 - 0 !
NEWS | 34 34 + 0 - 0 !
io/fcntl.h | 2 1 + 1 - 0 !
localedata/locales/ca_ES | 111 71 + 40 - 0 !
localedata/locales/cs_CZ | 15 14 + 1 - 0 !
localedata/locales/el_CY | 8 7 + 1 - 0 !
localedata/locales/el_GR | 8 7 + 1 - 0 !
localedata/locales/et_EE | 2 2 + 0 - 0 !
localedata/locales/lt_LT | 12 6 + 6 - 0 !
nscd/gai.c | 3 3 + 0 - 0 !
nscd/netgroupcache.c | 2 1 + 1 - 0 !
nss/nsswitch.c | 2 1 + 1 - 0 !
nss/nsswitch.h | 8 4 + 4 - 0 !
po/pt_BR.po | 9546 6238 + 3308 - 0 !
posix/tst-glob_lstat_compat.c | 7 7 + 0 - 0 !
posix/tst-rfc3484-2.c | 1 1 + 0 - 0 !
posix/tst-rfc3484-3.c | 1 1 + 0 - 0 !
posix/tst-rfc3484.c | 1 1 + 0 - 0 !
string/test-memmove.c | 58 58 + 0 - 0 !
sysdeps/i386/i686/multiarch/memcpy-sse2-unaligned.S | 12 6 + 6 - 0 !
sysdeps/powerpc/powerpc32/sysdep.h | 2 1 + 1 - 0 !
sysdeps/powerpc/sysdep.h | 2 1 + 1 - 0 !
sysdeps/riscv/rvd/s_fmax.c | 11 9 + 2 - 0 !
sysdeps/riscv/rvd/s_fmin.c | 11 9 + 2 - 0 !
sysdeps/riscv/rvf/s_fmaxf.c | 11 9 + 2 - 0 !
sysdeps/riscv/rvf/s_fminf.c | 11 9 + 2 - 0 !
sysdeps/riscv/tls-macros.h | 20 3 + 17 - 0 !
sysdeps/sh/libm-test-ulps | 493 445 + 48 - 0 !
sysdeps/sparc/sparc32/start.S | 4 2 + 2 - 0 !
sysdeps/sparc/sparc64/start.S | 4 2 + 2 - 0 !
sysdeps/unix/sysv/linux/aarch64/sys/ptrace.h | 8 0 + 8 - 0 !
sysdeps/unix/sysv/linux/bits/mman-shared.h | 2 1 + 1 - 0 !
sysdeps/unix/sysv/linux/i386/Makefile | 3 3 + 0 - 0 !
sysdeps/unix/sysv/linux/i386/sigaction.c | 3 2 + 1 - 0 !
sysdeps/unix/sysv/linux/i386/tst-bz21269.c | 235 235 + 0 - 0 !
sysdeps/unix/sysv/linux/powerpc/elision-lock.c | 2 2 + 0 - 0 !
sysdeps/unix/sysv/linux/powerpc/elision-trylock.c | 2 2 + 0 - 0 !
sysdeps/unix/sysv/linux/powerpc/elision-unlock.c | 4 4 + 0 - 0 !
sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h | 105 105 + 0 - 0 !
sysdeps/unix/sysv/linux/riscv/readelflib.c | 3 2 + 1 - 0 !
sysdeps/unix/sysv/linux/sparc/sparc32/setcontext.S | 13 13 + 0 - 0 !
time/time.h | 2 1 + 1 - 0 !
42 files changed, 7534 insertions(+), 3461 deletions(-)

---
locale/check unknown symbols.diff | (download)

locale/programs/ld-collate.c | 12 12 + 0 - 0 !
1 file changed, 12 insertions(+)

---
locale/locale print LANGUAGE.diff | (download)

locale/programs/locale.c | 4 4 + 0 - 0 !
1 file changed, 4 insertions(+)

---
locale/LC_IDENTIFICATION optional fields.diff | (download)

locale/programs/ld-identification.c | 9 6 + 3 - 0 !
1 file changed, 6 insertions(+), 3 deletions(-)

---
localedata/local all no archive.diff | (download)

localedata/Makefile | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

---
localedata/sort UTF8 first.diff | (download)

localedata/SUPPORTED | 14 7 + 7 - 0 !
1 file changed, 7 insertions(+), 7 deletions(-)

---
localedata/supported.diff | (download)

localedata/SUPPORTED | 5 5 + 0 - 0 !
1 file changed, 5 insertions(+)

 add several locales to localedata.supported
# DP: - ru_RU.CP1251 was requested in #225516
# DP: - uz_UZ.UTF-8 was clearly missing, uz_UZ had no UTF-8 variant
# DP: - da_DK.ISO-8859-15, en_GB.ISO-8859-15, en_US.ISO-8859-15, no_NO.UTF-8,
# DP:   no_NO and sv_SE.ISO-8859-15 are found in fedora-branch CVS branch.
# DP: Related bugs: #225516 (ru_RU.CP1251)
localedata/locale eu_FR.diff | (download)

localedata/SUPPORTED | 3 3 + 0 - 0 !
localedata/locales/eu_FR | 83 83 + 0 - 0 !
localedata/locales/eu_FR@euro | 83 83 + 0 - 0 !
3 files changed, 169 insertions(+)

 #257840: locales: please add the eu_fr locale
# DP: Related bugs: #257840
localedata/locale ku_TR.diff | (download)

localedata/locales/ku_TR | 85 40 + 45 - 0 !
1 file changed, 40 insertions(+), 45 deletions(-)

 please add kurdish locale
# DP: Related bugs: BZ870
localedata/fo_FO date_fmt.diff | (download)

localedata/locales/fo_FO | 3 2 + 1 - 0 !
1 file changed, 2 insertions(+), 1 deletion(-)

 fix d_t_fmt and date_fmt in fo_fo
# DP: Related bugs: #307194
localedata/locales_CH.diff | (download)

localedata/locales/it_CH | 4 1 + 3 - 0 !
1 file changed, 1 insertion(+), 3 deletions(-)

 lc_numeric: copy de_ch into it_ch
localedata/locales fr.diff | (download)

localedata/locales/fr_BE | 5 4 + 1 - 0 !
localedata/locales/fr_CA | 1 1 + 0 - 0 !
localedata/locales/fr_CH | 5 4 + 1 - 0 !
localedata/locales/fr_FR | 7 7 + 0 - 0 !
localedata/locales/fr_LU | 5 4 + 1 - 0 !
5 files changed, 20 insertions(+), 3 deletions(-)

 various fixes for all french locales
# DP: Related bugs: #248377  #351786 #345481
localedata/locale en_DK.diff | (download)

localedata/SUPPORTED | 1 1 + 0 - 0 !
localedata/locales/en_DK | 22 3 + 19 - 0 !
2 files changed, 4 insertions(+), 19 deletions(-)

 improve en_dk and add en_dk.iso-8859-15 to supported
# DP:   This locale is only useful to provide ISO8601 date formats.
# DP: Related bugs: #323159
localedata/locale csb_PL.diff | (download)

localedata/locales/csb_PL | 15 11 + 4 - 0 !
1 file changed, 11 insertions(+), 4 deletions(-)

---
localedata/locale zh_TW.diff | (download)

localedata/locales/zh_TW | 4 2 + 2 - 0 !
1 file changed, 2 insertions(+), 2 deletions(-)

---
localedata/locale se_NO.diff | (download)

localedata/locales/se_NO | 5 3 + 2 - 0 !
1 file changed, 3 insertions(+), 2 deletions(-)

 fix se_no locale
localedata/tailor iso14651_t1.diff | (download)

localedata/locales/ar_SA | 219 2 + 217 - 0 !
localedata/locales/da_DK | 27 16 + 11 - 0 !
localedata/locales/es_ES | 12 12 + 0 - 0 !
localedata/locales/sl_SI | 2076 23 + 2053 - 0 !
4 files changed, 53 insertions(+), 2281 deletions(-)

 rewrite collation rules to include iso14651_t1
# DP:  es_ES: BZ664, by Pablo Saratxaga
# DP:  da_DK fi_FI nb_NO: BZ672, by Denis Barbier
# DP:  ar_SA cs_CZ et_EE hr_HR lt_LT pl_PL sl_SI tr_TR: not
# DP:    submitted yet.
# DP: Related bugs: BZ664 BZ672
localedata/submitted bz9725 locale sv_SE.diff | (download)

localedata/locales/sv_SE | 4 4 + 0 - 0 !
1 file changed, 4 insertions(+)

---
localedata/locale C.diff | (download)

localedata/locales/C | 3232 3232 + 0 - 0 !
1 file changed, 3232 insertions(+)

---
localedata/submitted en_AU date_fmt.diff | (download)

localedata/locales/en_AU | 1 1 + 0 - 0 !
1 file changed, 1 insertion(+)

---
localedata/submitted es_MX decimal_point.diff | (download)

localedata/locales/es_MX | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

---
localedata/submitted it_IT thousands_sep.diff | (download)

localedata/locales/it_IT | 4 2 + 2 - 0 !
1 file changed, 2 insertions(+), 2 deletions(-)

---
alpha/local gcc4.1.diff | (download)

sysdeps/unix/sysv/linux/alpha/ioperm.c | 8 4 + 4 - 0 !
1 file changed, 4 insertions(+), 4 deletions(-)

---
alpha/submitted dl support.diff | (download)

sysdeps/unix/sysv/linux/alpha/dl-support.c | 2 0 + 2 - 0 !
1 file changed, 2 deletions(-)

---
alpha/local string functions.diff | (download)

sysdeps/alpha/alphaev67/stpncpy.S | 115 0 + 115 - 0 !
sysdeps/alpha/alphaev67/strncat.S | 87 0 + 87 - 0 !
sysdeps/alpha/stpncpy.S | 106 0 + 106 - 0 !
sysdeps/alpha/strcmp.S | 194 0 + 194 - 0 !
sysdeps/alpha/strncat.S | 94 0 + 94 - 0 !
sysdeps/alpha/strncmp.S | 277 0 + 277 - 0 !
sysdeps/alpha/strncpy.S | 87 0 + 87 - 0 !
7 files changed, 960 deletions(-)

---
alpha/submitted fts64.diff | (download)

sysdeps/unix/sysv/linux/alpha/fts.c | 1 1 + 0 - 0 !
sysdeps/unix/sysv/linux/alpha/fts64.c | 1 1 + 0 - 0 !
2 files changed, 2 insertions(+)

---
alpha/submitted makecontext.diff | (download)

sysdeps/unix/sysv/linux/alpha/makecontext.S | 5 5 + 0 - 0 !
1 file changed, 5 insertions(+)

---
arm/local sigaction.diff | (download)

sysdeps/unix/sysv/linux/arm/sigaction.c | 9 2 + 7 - 0 !
1 file changed, 2 insertions(+), 7 deletions(-)

---
arm/unsubmitted ldconfig cache abi.diff | (download)

sysdeps/unix/sysv/linux/arm/readelflib.c | 127 127 + 0 - 0 !
1 file changed, 127 insertions(+)

---
arm/unsubmitted ldso abi check.diff | (download)

elf/dl-load.c | 219 219 + 0 - 0 !
1 file changed, 219 insertions(+)

---
arm/local soname hack.diff | (download)

elf/dl-load.c | 5 4 + 1 - 0 !
1 file changed, 4 insertions(+), 1 deletion(-)

---
arm/local vfp sysdeps.diff | (download)

sysdeps/arm/sysdep.h | 7 7 + 0 - 0 !
1 file changed, 7 insertions(+)

 work around broken compilers (like fpc) on armhf
arm/unsubmitted ldso multilib.diff | (download)

elf/dl-load.c | 9 9 + 0 - 0 !
1 file changed, 9 insertions(+)

---
arm/local arm futex.diff | (download)

sysdeps/unix/sysv/linux/arm/kernel-features.h | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 lie about futex_atomic_cmpxchg_inatomic kernel support.
 In past versions of glibc, we incorrectly assumed all ARM kernels
 in all configurations supported futex_atomic_cmpxchg_inatomic. This
 was clearly a lie, however it was a lie that we relied on, because
 the fallback implementation appears to not play nicely with certain
 applications like pulseaudio.  Restore the lie for kernels > 2.6.32
 and plug our ears and scream "LA LA LA" about how wrong this is.
hppa/local inlining.diff | (download)

sysdeps/hppa/Makefile | 1 1 + 0 - 0 !
1 file changed, 1 insertion(+)

---
hurd i386/local enable ldconfig.diff | (download)

elf/ldconfig.c | 4 4 + 0 - 0 !
sysdeps/mach/hurd/configure | 2 2 + 0 - 0 !
sysdeps/mach/hurd/configure.ac | 2 2 + 0 - 0 !
3 files changed, 8 insertions(+)

 enable ldconfig and such on hurd-i386
hurd i386/tg context_functions.diff | (download)

sysdeps/mach/hurd/i386/Makefile | 5 5 + 0 - 0 !
sysdeps/mach/hurd/i386/getcontext.S | 74 74 + 0 - 0 !
sysdeps/mach/hurd/i386/makecontext-helper.c | 69 69 + 0 - 0 !
sysdeps/mach/hurd/i386/makecontext.S | 130 130 + 0 - 0 !
sysdeps/mach/hurd/i386/setcontext.S | 92 92 + 0 - 0 !
sysdeps/mach/hurd/i386/swapcontext.S | 110 110 + 0 - 0 !
sysdeps/mach/hurd/i386/ucontext_i.sym | 29 29 + 0 - 0 !
7 files changed, 509 insertions(+)

 [patch] getcontext, makecontext, setcontext, swapcontext

hurd i386/git tls.diff | (download)

hurd/hurdfault.c | 2 2 + 0 - 0 !
hurd/hurdsig.c | 2 2 + 0 - 0 !
include/errno.h | 14 8 + 6 - 0 !
mach/mach.h | 3 3 + 0 - 0 !
mach/setup-thread.c | 30 29 + 1 - 0 !
sysdeps/generic/thread_state.h | 1 1 + 0 - 0 !
sysdeps/mach/hurd/fork.c | 7 6 + 1 - 0 !
sysdeps/mach/hurd/i386/init-first.c | 54 34 + 20 - 0 !
sysdeps/mach/hurd/i386/tls.h | 52 47 + 5 - 0 !
sysdeps/mach/hurd/i386/trampoline.c | 2 1 + 1 - 0 !
sysdeps/mach/hurd/libc-lock.h | 3 3 + 0 - 0 !
sysdeps/mach/hurd/profil.c | 2 2 + 0 - 0 !
sysdeps/mach/hurd/setitimer.c | 3 2 + 1 - 0 !
sysdeps/mach/i386/thread_state.h | 11 10 + 1 - 0 !
sysdeps/mach/thread_state.h | 3 3 + 0 - 0 !
15 files changed, 153 insertions(+), 36 deletions(-)

 [patch] tls

TLS support.

All by Samuel Thibault.

hurd i386/git tls threadvar.diff | (download)

hurd/Versions | 6 1 + 5 - 0 !
hurd/hurd/signal.h | 23 13 + 10 - 0 !
hurd/hurd/threadvar.h | 85 7 + 78 - 0 !
hurd/hurdsig.c | 51 31 + 20 - 0 !
hurd/hurdstartup.c | 1 0 + 1 - 0 !
hurd/sigunwind.c | 4 2 + 2 - 0 !
include/errno.h | 2 1 + 1 - 0 !
sysdeps/mach/hurd/Versions | 4 2 + 2 - 0 !
sysdeps/mach/hurd/cthreads.c | 2 2 + 0 - 0 !
sysdeps/mach/hurd/dl-sysdep.c | 19 0 + 19 - 0 !
sysdeps/mach/hurd/errno-loc.c | 22 15 + 7 - 0 !
sysdeps/mach/hurd/errno.c | 1 0 + 1 - 0 !
sysdeps/mach/hurd/fork.c | 7 3 + 4 - 0 !
sysdeps/mach/hurd/i386/init-first.c | 36 0 + 36 - 0 !
sysdeps/mach/hurd/i386/makecontext-helper.c | 2 2 + 0 - 0 !
sysdeps/mach/hurd/i386/makecontext.S | 2 1 + 1 - 0 !
sysdeps/mach/hurd/i386/sigreturn.c | 5 2 + 3 - 0 !
sysdeps/mach/hurd/i386/tls.h | 29 29 + 0 - 0 !
sysdeps/mach/hurd/libc-lock.h | 4 2 + 2 - 0 !
sysdeps/mach/hurd/libc-tsd.h | 34 0 + 34 - 0 !
sysdeps/mach/hurd/mig-reply.c | 39 10 + 29 - 0 !
sysdeps/mach/hurd/profil.c | 6 3 + 3 - 0 !
22 files changed, 126 insertions(+), 258 deletions(-)

 [patch] tls-threadvar

replace the custom threadvar mechanism with generic TLS.
That will fix sigaltstack.

Note: the added reply_port and _hurd_sigstate fields should be kept last.


hurd i386/tg sysvshm.diff | (download)

hurd/Makefile | 1 1 + 0 - 0 !
hurd/sysvshm.c | 97 97 + 0 - 0 !
hurd/sysvshm.h | 47 47 + 0 - 0 !
sysdeps/mach/hurd/bits/posix_opt.h | 4 2 + 2 - 0 !
sysdeps/mach/hurd/ftok.c | 43 43 + 0 - 0 !
sysdeps/mach/hurd/shmat.c | 79 79 + 0 - 0 !
sysdeps/mach/hurd/shmctl.c | 132 132 + 0 - 0 !
sysdeps/mach/hurd/shmdt.c | 51 51 + 0 - 0 !
sysdeps/mach/hurd/shmget.c | 242 242 + 0 - 0 !
9 files changed, 694 insertions(+), 2 deletions(-)

 [patch] implement sysv shared memory for gnu/hurd.

2005-07-11  Marcus Brinkmann  <marcus@gnu.org>

        * hurd/Makefile (routines): Add sysvshm.
        (distribute): Add sysvshm.h.
        * hurd/sysvshm.h: New file.
        * hurd/sysvshm.c: New file.
        * sysdeps/mach/hurd/bits/stat.h (S_IMMAP0): New macro.
        (S_ISPARE): Unset the S_IMMAP0 flag.
        * sysdeps/mach/hurd/ftok.c: New file.
        * sysdeps/mach/hurd/shmat.c: New file.
        * sysdeps/mach/hurd/shmctl.c: New file.
        * sysdeps/mach/hurd/shmdt.c: New file.
        * sysdeps/mach/hurd/bits/posix_opt.h: Define _XOPEN_SHM to 1.


hurd i386/git _dl_random.diff | (download)

sysdeps/mach/hurd/dl-sysdep.c | 2 2 + 0 - 0 !
1 file changed, 2 insertions(+)

 [patch] _dl_random

_dl_random


hurd i386/tg thread cancel.diff | (download)

hurd/hurdexec.c | 1 0 + 1 - 0 !
hurd/thread-cancel.c | 2 0 + 2 - 0 !
sysdeps/mach/hurd/jmp-unwind.c | 3 1 + 2 - 0 !
sysdeps/mach/hurd/spawni.c | 1 0 + 1 - 0 !
4 files changed, 1 insertion(+), 6 deletions(-)

 [patch] the critical section lock _can_ be held in these place.

At least since hurd_thread_cancel can be called by another thread and lock our
critical lock.

http://bugs.debian.org/46859

“
Thomas suggested that there is no need to take the critical section
lock.  I believe that taking the critical section lock is necessary to
prevent the target thread from entering a signal handler.  Roland will
look into the problem.
”

Taking the critical section lock makes these assertions bogus.

It happens that hurd_thread_cancel is only called from libports and inside
/hurd/term so this is rare in practice.

A reproducer can be found here:

http://lists.gnu.org/archive/html/bug-hurd/2014-05/msg00025.html

2006-08-05  Samuel Thibault  <samuel.thibault@ens-lyon.org>

       * hurd/thread-cancel.c (hurd_thread_cancel): Do not assert that
       `&ss->critical_section_lock' is unlocked.
       * sysdeps/mach/hurd/jmp-unwind.c (_longjmp_unwind): Likewise, and take
       critical section lock before taking the sigstate lock.
       * sysdeps/mach/hurd/spawni.c (__spawni): Likewise.


hurd i386/tg bigmem.diff | (download)

sysdeps/mach/hurd/dl-sysdep.c | 28 22 + 6 - 0 !
1 file changed, 22 insertions(+), 6 deletions(-)

 [patch] allow the kernel to start earlier than vm_max_address

A bit hackish.


hurd i386/local disable ioctls.diff | (download)

sysdeps/mach/hurd/bits/ioctls.h | 6 6 + 0 - 0 !
1 file changed, 6 insertions(+)

---
hurd i386/tg locarchive.diff | (download)

locale/programs/locarchive.c | 18 18 + 0 - 0 !
1 file changed, 18 insertions(+)

 [patch] fix installation of locales-all

Dirty hack to fix installation of locales-all: instead of just locking the
archive extension (which is not supported on hurd-i386), lock it all.


hurd i386/tg sendmsg SCM_RIGHTS.diff | (download)

sysdeps/mach/hurd/recvmsg.c | 97 95 + 2 - 0 !
sysdeps/mach/hurd/sendmsg.c | 73 62 + 11 - 0 !
2 files changed, 157 insertions(+), 13 deletions(-)

 [patch] add support to send file descriptors over unix sockets


hurd i386/tg sendmsg SCM_CREDS.diff | (download)

hurd/Makefile | 2 1 + 1 - 0 !
sysdeps/mach/hurd/recvmsg.c | 137 137 + 0 - 0 !
sysdeps/mach/hurd/sendmsg.c | 36 36 + 0 - 0 !
3 files changed, 174 insertions(+), 1 deletion(-)

 [patch] hurd: scm_creds support

Svante Signell  <svante.signell@gmail.com>
Samuel Thibault  <samuel.thibault@ens-lyon.org>

	* sysdeps/mach/hurd/sendmsg.c (__libc_sendmsg): On SCM_CREDS
	control messages, record uids, pass a rendez-vous port in the
	control message, and call __auth_user_authenticate_request to
	make auth send credentials on that port.  Do not wait for a
	reply.
	* sysdeps/mach/hurd/recvmsg.c (contains_uid, contains_gid,
	check_auth): New functions.
	(__libc_recvmsg): On SCM_CREDS control messages, call check_auth
	to check the passed credentials thanks to the answer from the
	auth server.
	* hurd/Makefile (user-interfaces): Add auth_request and
	auth_reply.


hurd i386/git grantpt.diff | (download)

sysdeps/mach/hurd/ptsname.c | 23 19 + 4 - 0 !
1 file changed, 19 insertions(+), 4 deletions(-)

 [patch] t/grantpt

    /media/Stalin/tmp/glibc.hurd.gnu-2/libc_pic.os: In function `pts_name':
    /media/data/home/thomas/tmp/source/glibc/git/glibc.hurd/login/../sysdeps/unix/grantpt.c:52: undefined reference to `__ptsname_internal'
    collect2: ld returned 1 exit status
    make[1]: *** [/media/Stalin/tmp/glibc.hurd.gnu-2/libc.so] Error 1

Cf. aa9890239a2aef81e64f3f22a31c7e01b6501f69

Need any of the checks (stat, etc.) that Linux' __ptsname_internal does?

Implement close_all_fds as in 139ee080b6b428240bf49f3e6361f3ac729f891a?


hurd i386/tg mach hurd link.diff | (download)

Makerules | 3 3 + 0 - 0 !
1 file changed, 3 insertions(+)

 [patch] add -lmachuser -lhurduser to libc.so on gnu/hurd.

http://lists.gnu.org/archive/html/bug-hurd/2011-03/msg00112.html

2011-03-29  Samuel Thibault  <samuel.thibault@ens-lyon.org>

        * Makerules ($(inst_libdir)/libc.so): Add -lmachuser -lhurduser to
        libc.so on GNU/Hurd.

It's still unclear what we want to aim for.


hurd i386/local ED.diff | (download)

sysdeps/mach/hurd/bits/errno.h | 4 4 + 0 - 0 !
1 file changed, 4 insertions(+)

---
hurd i386/tg posix_thread.diff | (download)

sysdeps/mach/hurd/Makefile | 4 4 + 0 - 0 !
sysdeps/mach/hurd/bits/local_lim.h | 9 9 + 0 - 0 !
sysdeps/mach/hurd/bits/posix_opt.h | 42 28 + 14 - 0 !
3 files changed, 41 insertions(+), 14 deletions(-)

 [patch] t/posix_thread

Declare that we have a libpthread.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>


hurd i386/git gai_misc.diff | (download)

sysdeps/mach/hurd/gai_misc.h | 44 44 + 0 - 0 !
1 file changed, 44 insertions(+)

 [patch] t/gai_misc

Add a hurd version of threaded gai_misc.h

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>


hurd i386/local madvise_warn.diff | (download)

misc/madvise.c | 2 1 + 1 - 0 !
posix/posix_madvise.c | 2 1 + 1 - 0 !
2 files changed, 2 insertions(+), 2 deletions(-)

---
hurd i386/tg hurdsig fixes.diff | (download)

hurd/hurdsig.c | 272 160 + 112 - 0 !
1 file changed, 160 insertions(+), 112 deletions(-)

 [patch] signal code refactoring.

These patches should not change the current
behavior, although they do fix a few minor bugs which were made
apparent in the process. They are unchanged from my previous post
earlier this month.

    34f5960 _hurd_internal_post_signal: Split into more functions
    420eec9 _hurd_internal_post_signal: Scope variables more restrictively
    1f5accd _hurd_internal_post_signal: Split out inner functions
    1bb0a1d Hurd signals: refactor check_pending_signals
    1764465 Hurd signals: reindent
    28473d2 Hurd signals: make sigsuspend POSIX-conformant.
    26d091a Hurd signals: fix uninitialized value.


hurd i386/tg hurdsig global dispositions.diff | (download)

hurd/ctty-input.c | 16 10 + 6 - 0 !
hurd/ctty-output.c | 16 10 + 6 - 0 !
hurd/hurd/signal.h | 38 29 + 9 - 0 !
hurd/hurdexec.c | 9 5 + 4 - 0 !
hurd/hurdmsg.c | 24 4 + 20 - 0 !
hurd/hurdsig.c | 272 211 + 61 - 0 !
sysdeps/mach/hurd/fork.c | 24 20 + 4 - 0 !
sysdeps/mach/hurd/i386/sigreturn.c | 10 5 + 5 - 0 !
sysdeps/mach/hurd/i386/trampoline.c | 6 5 + 1 - 0 !
sysdeps/mach/hurd/sigaction.c | 16 8 + 8 - 0 !
sysdeps/mach/hurd/sigpending.c | 6 3 + 3 - 0 !
sysdeps/mach/hurd/sigprocmask.c | 8 4 + 4 - 0 !
sysdeps/mach/hurd/sigsuspend.c | 15 8 + 7 - 0 !
sysdeps/mach/hurd/sigwait.c | 21 13 + 8 - 0 !
sysdeps/mach/hurd/spawni.c | 23 13 + 10 - 0 !
15 files changed, 348 insertions(+), 156 deletions(-)

 [patch] global signal dispositions.

Although they should not change the
default behaviors of signals for cthread programs, these patches add
new functions which can be used by libpthread to enable
POSIX-conforming behavior of signals on a per-thread basis.

YYYY-MM-DD  Jeremie Koenig  <jk@jk.fr.eu.org>

    e407ae3 Hurd signals: implement global signal dispositions
    38eb4b3 Hurd signals: provide a sigstate destructor
    344dfd6 Hurd signals: fix sigwait() for global signals
    fb055f2 Hurd signals: fix global untraced signals.

YYYY-MM-DD  Thomas Schwinge  <thomas@codesourcery.com>

	* sysdeps/mach/hurd/fork.c (__fork): In the child, reinitialize
	the global sigstate's lock.

This is work in progress.

This cures an issue that would very rarely cause a deadlock in the child
in fork, tries to unlock ss' critical section lock at the end of fork.
This will typically (always?) be observed in /bin/sh, which is not
surprising as that is the foremost caller of fork.

To reproduce an intermediate state, add an endless loop if
_hurd_global_sigstate is locked after __proc_dostop (cast through
volatile); that is, while still being in the fork's parent process.

When that triggers (use the libtool testsuite), the signal thread has
already locked ss (which is _hurd_global_sigstate), and is stuck at
hurdsig.c:685 in post_signal, trying to lock _hurd_siglock (which the
main thread already has locked and keeps locked until after
__task_create).  This is the case that ss->thread == MACH_PORT_NULL, that
is, a global signal.  In the main thread, between __proc_dostop and
__task_create is the __thread_abort call on the signal thread which would
abort any current kernel operation (but leave ss locked).  Later in fork,
in the parent, when _hurd_siglock is unlocked in fork, the parent's
signal thread can proceed and will unlock eventually the global sigstate.
In the client, _hurd_siglock will likewise be unlocked, but the global
sigstate never will be, as the client's signal thread has been configured
to restart execution from _hurd_msgport_receive.  Thus, when the child
tries to unlock ss' critical section lock at the end of fork, it will
first lock the global sigstate, will spin trying to lock it, which can
never be successful, and we get our deadlock.

Options seem to be:

  * Move the locking of _hurd_siglock earlier in post_signal -- but that
    may generally impact performance, if this locking isn't generally
    needed anyway?

    On the other hand, would it actually make sense to wait here until we
    are not any longer in a critical section (which is meant to disable
    signal delivery anyway (but not for preempted signals?))?

  * Clear the global sigstate in the fork's child with the rationale that
    we're anyway restarting the signal thread from a clean state.  This
    has now been implemented.

Why has this problem not been observed before Jérémie's patches?  (Or has
it?  Perhaps even more rarely?)  In _S_msg_sig_post, the signal is now
posted to a *global receiver thread*, whereas previously it was posted to
the *designated signal-receiving thread*.  The latter one was in a
critical section in fork, so didn't try to handle the signal until after
leaving the critical section?  (Not completely analyzed and verified.)

Another question is what the signal is that is being received
during/around the time __proc_dostop executes.