glibc.git
3 years agoMerge version 2.28-10+rpi1+deb10u1 and 2.28-10+deb10u2 to produce 2.28-10+rpi1+deb10u2 archive/raspbian/2.28-10+rpi1+deb10u2 raspbian/2.28-10+rpi1+deb10u2
Raspbian automatic forward porter [Tue, 18 Oct 2022 23:38:58 +0000 (00:38 +0100)]
Merge version 2.28-10+rpi1+deb10u1 and 2.28-10+deb10u2 to produce 2.28-10+rpi1+deb10u2

3 years agoMerge glibc (2.28-10+deb10u2) import into refs/heads/workingbranch
Helmut Grohne [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
Merge glibc (2.28-10+deb10u2) import into refs/heads/workingbranch

3 years ago[PATCH] CVE-2022-23219: Buffer overflow in sunrpc clnt_create for "unix" (bug 22542)
Florian Weimer [Mon, 17 Jan 2022 09:21:34 +0000 (10:21 +0100)]
[PATCH] CVE-2022-23219: Buffer overflow in sunrpc clnt_create for "unix" (bug 22542)

Processing an overlong pathname in the sunrpc clnt_create function
results in a stack-based buffer overflow.

Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Helmut Grohne: Ported to glibc 2.28. Inlined __sockaddr_un_set.

Gbp-Pq: Topic all
Gbp-Pq: Name git-CVE-2022-23219-Buffer-overflow-in-sunrpc-clnt_create.diff

3 years ago[PATCH] CVE-2022-23218: Buffer overflow in sunrpc svcunix_create (bug 28768)
Florian Weimer [Mon, 17 Jan 2022 09:21:34 +0000 (10:21 +0100)]
[PATCH] CVE-2022-23218: Buffer overflow in sunrpc svcunix_create (bug 28768)

The sunrpc function svcunix_create suffers from a stack-based buffer
overflow with overlong pathname arguments.

Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Helmut Grohne: Ported to glibc 2.28. Inlined __sockaddr_un_set.

Gbp-Pq: Topic all
Gbp-Pq: Name git-CVE-2022-23218-Buffer-overflow-in-sunrpc-svcunix_cre.diff

3 years ago[PATCH] wordexp: handle overflow in positional parameter number (bug 28011)
Andreas Schwab [Fri, 25 Jun 2021 13:02:47 +0000 (15:02 +0200)]
[PATCH] wordexp: handle overflow in positional parameter number (bug 28011)

Use strtoul instead of atoi so that overflow can be detected.

Gbp-Pq: Topic all
Gbp-Pq: Name git-CVE-2021-35942-wordexp-handle-overflow-in-positional-parameter-numb.diff

3 years ago[PATCH] Use __pthread_attr_copy in mq_notify (bug 27896)
Andreas Schwab [Thu, 27 May 2021 10:49:47 +0000 (12:49 +0200)]
[PATCH] Use __pthread_attr_copy in mq_notify (bug 27896)

Make a deep copy of the pthread attribute object to remove a potential
use-after-free issue.

From 217b6dc298156bdb0d6aea9ea93e7e394a5ff091 Mon Sep 17 00:00:00 2001
From: Florian Weimer <fweimer@redhat.com>
Date: Tue, 1 Jun 2021 17:51:41 +0200
Subject: [PATCH] Fix use of __pthread_attr_copy in mq_notify (bug 27896)

__pthread_attr_copy can fail and does not initialize the attribute
structure in that case.

If __pthread_attr_copy is never called and there is no allocated
attribute, pthread_attr_destroy should not be called, otherwise
there is a null pointer dereference in rt/tst-mqueue6.

Fixes commit 42d359350510506b87101cf77202fefcbfc790cb
("Use __pthread_attr_copy in mq_notify (bug 27896)").

Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
From b805aebd42364fe696e417808a700fdb9800c9e8 Mon Sep 17 00:00:00 2001
From: Nikita Popov <npv1310@gmail.com>
Date: Mon, 9 Aug 2021 20:17:34 +0530
Subject: [PATCH] librt: fix NULL pointer dereference (bug 28213)

Helper thread frees copied attribute on NOTIFY_REMOVED message
received from the OS kernel.  Unfortunately, it fails to check whether
copied attribute actually exists (data.attr != NULL).  This worked
earlier because free() checks passed pointer before actually
attempting to release corresponding memory.  But
__pthread_attr_destroy assumes pointer is not NULL.

So passing NULL pointer to __pthread_attr_destroy will result in
segmentation fault.  This scenario is possible if
notification->sigev_notify_attributes == NULL (which means default
thread attributes should be used).

Signed-off-by: Nikita Popov <npv1310@gmail.com>
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
From 4cc79c217744743077bf7a0ec5e0a4318f1e6641 Mon Sep 17 00:00:00 2001
From: Nikita Popov <npv1310@gmail.com>
Date: Thu, 12 Aug 2021 16:09:50 +0530
Subject: [PATCH] librt: add test (bug 28213)

This test implements following logic:
1) Create POSIX message queue.
   Register a notification with mq_notify (using NULL attributes).
   Then immediately unregister the notification with mq_notify.
   Helper thread in a vulnerable version of glibc
   should cause NULL pointer dereference after these steps.
2) Once again, register the same notification.
   Try to send a dummy message.
   Test is considered successfulif the dummy message
   is successfully received by the callback function.

Signed-off-by: Nikita Popov <npv1310@gmail.com>
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Gbp-Pq: Topic all
Gbp-Pq: Name git-CVE-2021-33574-mq_notify-use-after-free.diff

3 years ago[PATCH] nscd: Fix double free in netgroupcache [BZ #27462]
DJ Delorie [Thu, 25 Feb 2021 21:08:21 +0000 (16:08 -0500)]
[PATCH] nscd: Fix double free in netgroupcache [BZ #27462]

In commit 745664bd798ec8fd50438605948eea594179fba1 a use-after-free
was fixed, but this led to an occasional double-free.  This patch
tracks the "live" allocation better.

Tested manually by a third party.

Related: RHBZ 1927877

Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Gbp-Pq: Topic all
Gbp-Pq: Name git-CVE-2021-27645-nscd-Fix-double-free-in-netgroupcache-BZ-27462.diff

3 years ago[PATCH] getcwd: Set errno to ERANGE for size == 1 (CVE-2021-3999)
Siddhesh Poyarekar [Fri, 21 Jan 2022 18:02:56 +0000 (23:32 +0530)]
[PATCH] getcwd: Set errno to ERANGE for size == 1 (CVE-2021-3999)

No valid path returned by getcwd would fit into 1 byte, so reject the
size early and return NULL with errno set to ERANGE.  This change is
prompted by CVE-2021-3999, which describes a single byte buffer
underflow and overflow when all of the following conditions are met:

- The buffer size (i.e. the second argument of getcwd) is 1 byte
- The current working directory is too long
- '/' is also mounted on the current working directory

Sequence of events:

- In sysdeps/unix/sysv/linux/getcwd.c, the syscall returns ENAMETOOLONG
  because the linux kernel checks for name length before it checks
  buffer size

- The code falls back to the generic getcwd in sysdeps/posix

- In the generic func, the buf[0] is set to '\0' on line 250

- this while loop on line 262 is bypassed:

    while (!(thisdev == rootdev && thisino == rootino))

  since the rootfs (/) is bind mounted onto the directory and the flow
  goes on to line 449, where it puts a '/' in the byte before the
  buffer.

- Finally on line 458, it moves 2 bytes (the underflowed byte and the
  '\0') to the buf[0] and buf[1], resulting in a 1 byte buffer overflow.

- buf is returned on line 469 and errno is not set.

This resolves BZ #28769.

Reviewed-by: Andreas Schwab <schwab@linux-m68k.org>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Signed-off-by: Qualys Security Advisory <qsa@qualys.com>
Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Backport to glibc 2.28 by Helmut Grohne:

There is no __getcwd_generic. Instead, __getcwd is directly vulnerable and no
ENAMETOOLONG is needed.

The test case is removed, because backporting the relevant support code is
non-trivial.

Gbp-Pq: Topic all
Gbp-Pq: Name git-CVE-2021-3999-getcwd-Set-errno-to-ERANGE-for-size-1.diff

3 years ago[PATCH] gconv: Fix assertion failure in ISO-2022-JP-3 module (bug 27256)
Florian Weimer [Wed, 27 Jan 2021 12:36:12 +0000 (13:36 +0100)]
[PATCH] gconv: Fix assertion failure in ISO-2022-JP-3 module (bug 27256)

The conversion loop to the internal encoding does not follow
the interface contract that __GCONV_FULL_OUTPUT is only returned
after the internal wchar_t buffer has been filled completely.  This
is enforced by the first of the two asserts in iconv/skeleton.c:

      /* We must run out of output buffer space in this
 rerun.  */
      assert (outbuf == outerr);
      assert (nstatus == __GCONV_FULL_OUTPUT);

This commit solves this issue by queuing a second wide character
which cannot be written immediately in the state variable, like
other converters already do (e.g., BIG5-HKSCS or TSCII).

Reported-by: Tavis Ormandy <taviso@gmail.com>
From ff012870b2c02a62598c04daa1e54632e020fd7d Mon Sep 17 00:00:00 2001
From: Nikita Popov <npv1310@gmail.com>
Date: Tue, 2 Nov 2021 13:21:42 +0500
Subject: [PATCH] gconv: Do not emit spurious NUL character in ISO-2022-JP-3
 (bug 28524)

Bugfix 27256 has introduced another issue:
In conversion from ISO-2022-JP-3 encoding, it is possible
to force iconv to emit extra NUL character on internal state reset.
To do this, it is sufficient to feed iconv with escape sequence
which switches active character set.
The simplified check 'data->__statep->__count != ASCII_set'
introduced by the aforementioned bugfix picks that case and
behaves as if '\0' character has been queued thus emitting it.

To eliminate this issue, these steps are taken:
* Restore original condition
'(data->__statep->__count & ~7) != ASCII_set'.
It is necessary since bits 0-2 may contain
number of buffered input characters.
* Check that queued character is not NUL.
Similar step is taken for main conversion loop.

Bundled test case follows following logic:
* Try to convert ISO-2022-JP-3 escape sequence
switching active character set
* Reset internal state by providing NULL as input buffer
* Ensure that nothing has been converted.

Signed-off-by: Nikita Popov <npv1310@gmail.com>
Gbp-Pq: Topic all
Gbp-Pq: Name git-CVE-2021-3326-Fix-assertion-failure-in-ISO-2022-JP-3-module-.diff

3 years ago[PATCH] iconv: Accept redundant shift sequences in IBM1364 [BZ #26224]
Arjun Shankar [Wed, 4 Nov 2020 11:19:38 +0000 (12:19 +0100)]
[PATCH] iconv: Accept redundant shift sequences in IBM1364 [BZ #26224]

The IBM1364, IBM1371, IBM1388, IBM1390 and IBM1399 character sets
share converter logic (iconvdata/ibm1364.c) which would reject
redundant shift sequences when processing input in these character
sets.  This led to a hang in the iconv program (CVE-2020-27618).

This commit adjusts the converter to ignore redundant shift sequences
and adds test cases for iconv_prog hangs that would be triggered upon
their rejection.  This brings the implementation in line with other
converters that also ignore redundant shift sequences (e.g. IBM930
etc., fixed in commit 692de4b3960d).

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Beware that in the Debian build, tst-iconv_prog.sh fails to pick up the built
IBM1364.so and tests the system one instead. As such, the test case will fail
on the initial build, but succeed on subsequent ones.

Gbp-Pq: Topic all
Gbp-Pq: Name git-CVE-2020-27618-iconv-Accept-redundant-shift-sequences-in-IBM1364-BZ.diff

3 years ago[PATCH] Avoid ldbl-96 stack corruption from range reduction of pseudo-zero (bug 25487).
Joseph Myers [Wed, 12 Feb 2020 23:31:56 +0000 (23:31 +0000)]
[PATCH] Avoid ldbl-96 stack corruption from range reduction of pseudo-zero (bug 25487).

Bug 25487 reports stack corruption in ldbl-96 sinl on a pseudo-zero
argument (an representation where all the significand bits, including
the explicit high bit, are zero, but the exponent is not zero, which
is not a valid representation for the long double type).

Although this is not a valid long double representation, existing
practice in this area (see bug 4586, originally marked invalid but
subsequently fixed) is that we still seek to avoid invalid memory
accesses as a result, in case of programs that treat arbitrary binary
data as long double representations, although the invalid
representations of the ldbl-96 format do not need to be consistently
handled the same as any particular valid representation.

This patch makes the range reduction detect pseudo-zero and unnormal
representations that would otherwise go to __kernel_rem_pio2, and
returns a NaN for them instead of continuing with the range reduction
process.  (Pseudo-zero and unnormal representations whose unbiased
exponent is less than -1 have already been safely returned from the
function before this point without going through the rest of range
reduction.)  Pseudo-zero representations would previously result in
the value passed to __kernel_rem_pio2 being all-zero, which is
definitely unsafe; unnormal representations would previously result in
a value passed whose high bit is zero, which might well be unsafe
since that is not a form of input expected by __kernel_rem_pio2.

Tested for x86_64.

Gbp-Pq: Topic all
Gbp-Pq: Name git-CVE-2020-10029-Avoid-ldbl-96-stack-corruption-from-range-reduction.diff

3 years ago[PATCH] arm: CVE-2020-6096: fix memcpy and memmove for negative length [BZ #25620]
Evgeny Eremin [Wed, 8 Jul 2020 12:18:19 +0000 (14:18 +0200)]
[PATCH] arm: CVE-2020-6096: fix memcpy and memmove for negative length [BZ #25620]

Unsigned branch instructions could be used for r2 to fix the wrong
behavior when a negative length is passed to memcpy and memmove.
This commit fixes the generic arm implementation of memcpy amd memmove.

From beea361050728138b82c57dda0c4810402d342b9 Mon Sep 17 00:00:00 2001
From: Alexander Anisimov <a.anisimov@omprussia.ru>
Date: Wed, 8 Jul 2020 14:18:31 +0200
Subject: [PATCH] arm: CVE-2020-6096: Fix multiarch memcpy for negative length
 [BZ #25620]

Unsigned branch instructions could be used for r2 to fix the wrong
behavior when a negative length is passed to memcpy.
This commit fixes the armv7 version.

From eec0f4218cda936a6ab8f543e90b96b196df3fc2 Mon Sep 17 00:00:00 2001
From: Florian Weimer <fweimer@redhat.com>
Date: Tue, 12 May 2020 19:02:08 +0200
Subject: [PATCH] string: Add string/tst-memmove-overflow, a test case for bug
 25620

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
From 0e28cfff9dfdb71352151054e0d38816856182d5 Mon Sep 17 00:00:00 2001
From: Florian Weimer <fweimer@redhat.com>
Date: Tue, 12 May 2020 19:01:49 +0200
Subject: [PATCH] support: Add support_blob_repeat_allocate_shared

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Gbp-Pq: Topic arm
Gbp-Pq: Name git-CVE-2020-6096-fix-memcpy-and-memmove-for-negative-size.diff

3 years ago[PATCH] Fix use-after-free in glob when expanding ~user (bug 25414)
Andreas Schwab [Wed, 19 Feb 2020 16:21:46 +0000 (17:21 +0100)]
[PATCH] Fix use-after-free in glob when expanding ~user (bug 25414)

The value of `end_name' points into the value of `dirname', thus don't
deallocate the latter before the last use of the former.

Gbp-Pq: Topic all
Gbp-Pq: Name git-CVE-2020-1752-Fix-use-after-free-in-glob-when-expanding-user-bug-2.diff

3 years ago[PATCH] Fix buffer overrun in EUC-KR conversion module (bz #24973)
Andreas Schwab [Mon, 21 Dec 2020 03:26:43 +0000 (08:56 +0530)]
[PATCH] Fix buffer overrun in EUC-KR conversion module (bz #24973)

The byte 0xfe as input to the EUC-KR conversion denotes a user-defined
area and is not allowed.  The from_euc_kr function used to skip two bytes
when told to skip over the unknown designation, potentially running over
the buffer end.

Gbp-Pq: Topic all
Gbp-Pq: Name git-CVE-2019-25013-Fix-buffer-overrun-in-EUC-KR-conversion-module-bz-24.diff

3 years ago[PATCH] rtld: Check __libc_enable_secure before honoring LD_PREFER_MAP_32BIT_EXEC...
Marcin Koƛcielnicki [Wed, 20 Nov 2019 23:20:15 +0000 (00:20 +0100)]
[PATCH] rtld: Check __libc_enable_secure before honoring LD_PREFER_MAP_32BIT_EXEC (CVE-2019-19126) [BZ #25204]

The problem was introduced in glibc 2.23, in commit
b9eb92ab05204df772eb4929eccd018637c9f3e9
("Add Prefer_MAP_32BIT_EXEC to map executable pages with MAP_32BIT").

Gbp-Pq: Topic all
Gbp-Pq: Name git-CVE-2019-19126-rtld-Check-__libc_enable_secure-before-honoring-LD_P.diff

3 years ago[PATCH] Rewrite iconv option parsing [BZ #19519]
Arjun Shankar [Tue, 7 Jul 2020 18:31:48 +0000 (20:31 +0200)]
[PATCH] Rewrite iconv option parsing [BZ #19519]

This commit replaces string manipulation during `iconv_open' and iconv_prog
option parsing with a structured, flag based conversion specification.  In
doing so, it alters the internal `__gconv_open' interface and accordingly
adjusts its uses.

This change fixes several hangs in the iconv program and therefore includes
a new test to exercise iconv_prog options that originally led to these hangs.
It also includes a new regression test for option handling in the iconv
function.

Reviewed-by: Florian Weimer <fweimer@redhat.com>
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Gbp-Pq: Topic all
Gbp-Pq: Name git-CVE-2016-10228-Rewrite-iconv-option-parsing-BZ-19519.diff

3 years agogit-libio-stdout-putc
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
git-libio-stdout-putc

2019-01-31  Paul Pluzhnikov  <ppluzhnikov@google.com>

[BZ #24051]
* libio/ioputs.c (_IO_puts): Use stdout instead of _IO_stdout.
* libio/fileops.c (_IO_new_file_underflow): Likewise
* libio/wfileops.c (_IO_wfile_underflow): Likewise
* libio/putchar.c (putchar): Likewise.
* libio/putchar_u.c (putchar_unlocked): Likewise.
* libio/putwchar.c (putchar): Likewise.
* libio/putwchar_u.c (putwchar_unlocked): Likewise.
* libio/tst-bz24051.c: New test.
* libio/Makefile (tests): Add tst-bz24051

Gbp-Pq: Topic any
Gbp-Pq: Name git-libio-stdout-putc.diff

3 years agoTurn off HAVE_FLOAT128 for CUDACC and ICC compilers.
Adam Conrad [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
Turn off HAVE_FLOAT128 for CUDACC and ICC compilers.

Bug-Ubuntu: https://bugs.launchpad.net/bugs/1717257
Forwarded: no
Last-Update: 2017-10-11

Gbp-Pq: Topic any
Gbp-Pq: Name local-cudacc-float128.diff

3 years agosubmitted-resolv-unaligned
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
submitted-resolv-unaligned

Gbp-Pq: Topic any
Gbp-Pq: Name submitted-resolv-unaligned.diff

3 years agolocal-bootstrap-headers
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
local-bootstrap-headers

Taken from EGLIBC, r1484 + r1525

2018-03-09  Aurelien Jarno <aurelien@aurel32.net>

* Makefile (install-headers): Amend to install gnu/lib-names-$abi.h.

2014-07-30  Helmut Grohne <helmut@subdivi.de>

* With the advent of multilib gnu/stubs.h became a meta-header that
includes the correct stubs-$abi.h. So install gnu/stubs.h as usual
and install stubs-bootstrap.h as gnu/stubs-$abi.h

2007-02-20  Jim Blandy  <jimb@codesourcery.com>

* Makefile (install-headers): Preserve old behavior: depend on
$(inst_includedir)/gnu/stubs.h only if install-bootstrap-headers
is set; otherwise, place gnu/stubs.h on the 'install-others' list.

2007-02-16  Jim Blandy  <jimb@codesourcery.com>

        * Makefile: Amend make install-headers to install everything
        necessary for building a cross-compiler.  Install gnu/stubs.h as
        part of 'install-headers', not 'install-others'.
        If install-bootstrap-headers is 'yes', install a dummy copy of
        gnu/stubs.h, instead of computing the real thing.
        * include/stubs-bootstrap.h: New file.

Gbp-Pq: Topic any
Gbp-Pq: Name local-bootstrap-headers.diff

3 years agolocal-libpic
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
local-libpic

Gbp-Pq: Topic any
Gbp-Pq: Name local-libpic.diff

3 years agolocal-ldconfig-ignore-ld.so
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
local-ldconfig-ignore-ld.so

Gbp-Pq: Topic any
Gbp-Pq: Name local-ldconfig-ignore-ld.so.diff

3 years agoFix dlopen segfault in statically linked programs
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
Fix dlopen segfault in statically linked programs

Origin: http://www.eglibc.org/archives/issues/msg00084.html
Last-Update: 2013-10-09

Gbp-Pq: Topic any
Gbp-Pq: Name unsubmitted-dlopen-static-crash.diff

3 years agounsubmitted-ldso-machine-mismatch
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
unsubmitted-ldso-machine-mismatch

Gbp-Pq: Topic any
Gbp-Pq: Name unsubmitted-ldso-machine-mismatch.diff

3 years agolocal-tst-eintr1-eagain
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
local-tst-eintr1-eagain

2012-06-06  Jonathan Nieder  <jrnieder@gmail.com>

* nptl/tst-eintr1.c (tf1): Tolerate EAGAIN from pthread_create.

Gbp-Pq: Topic any
Gbp-Pq: Name local-tst-eintr1-eagain.diff

3 years agolocal-revert-bz13979
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
local-revert-bz13979

Revert:

X-Git-Tag: glibc-2.16-tps~448
X-Git-Url: http://sourceware.org/git/?p=glibc.git;a=commitdiff_plain;h=05c2c9618f583ea4acd69b3fe5ae2a2922dd2ddc

Warn if user requests __FORTIFY_SOURCE but it is disabled

[BZ #13979]
        * include/features.h: Warn if user requests __FORTIFY_SOURCE
        checking but the checks are disabled for any reason.

Gbp-Pq: Topic any
Gbp-Pq: Name local-revert-bz13979.diff

3 years agolocal-disable-libnss-db
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
local-disable-libnss-db

Disable libnss-db as the format is not compatible with the libnss-db package, and is
architecture dependent.

Gbp-Pq: Topic any
Gbp-Pq: Name local-disable-libnss-db.diff

3 years agomake ldconfig use the built-in system paths
Steve Langasek [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
make ldconfig use the built-in system paths

Bug-Ubuntu: https://bugs.launchpad.net/bugs/736932

Make ldconfig use the same view of built-in system paths that ld.so does,
instead of just using SLIBDIR and LIBDIR; this corrects a failure of
ldconfig to cache libraries in non-multiarch directories when building for
multiarch, even though they're on the system path.

Gbp-Pq: Topic any
Gbp-Pq: Name local-ldconfig-multiarch.diff

3 years agosubmitted-nptl-invalid-td
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
submitted-nptl-invalid-td

2010-02-27  Aurelien Jarno  <aurelien@aurel32.net>

* pthreadP.h(INVALID_TD_P, INVALID_NOT_TERMINATED_TD_P): detect
NULL pointers.

Gbp-Pq: Topic any
Gbp-Pq: Name submitted-nptl-invalid-td.patch

3 years agosubmitted-bits-fcntl_h-at
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
submitted-bits-fcntl_h-at

2012-10-08  Wookey  <wookey@wookware.org>

        * include AT_* defines in sysdeps/unix/sysv/linux/aarch64/bits/fcntl.h

2009-11-19  Aurelien Jarno  <aurelien@aurel32.net>

* io/fcntl.h: Move AT_* defines to...
* sysdeps/mach/hurd/bits/fcntl.h: ...here.
* sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h: ...here.
* sysdeps/unix/sysv/linux/s390/bits/fcntl.h: ...here.
* sysdeps/unix/sysv/linux/sh/bits/fcntl.h: ...here.
* sysdeps/unix/sysv/linux/sparc/bits/fcntl.h: ...here.
* sysdeps/unix/sysv/linux/x86/bits/fcntl.h: ...here.

2009-11-19  Aurelien Jarno  <aurelien@aurel32.net>

* sysdeps/unix/sysv/linux/alpha/bits/fcntl.h: Define AT_*
constants.
* sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Define AT_*
constants.
* sysdeps/unix/sysv/linux/hppa/bits/fcntl.h: Define AT_*
constants.
* sysdeps/unix/sysv/linux/ia64/bits/fcntl.h: Define AT_*
constants.
* sysdeps/unix/sysv/linux/m68k/bits/fcntl.h: Define AT_*
constants.
* sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Define AT_*
constants.

Gbp-Pq: Topic any
Gbp-Pq: Name submitted-bits-fcntl_h-at.diff

3 years agosubmitted-missing-etc-hosts
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
submitted-missing-etc-hosts

Gbp-Pq: Topic any
Gbp-Pq: Name submitted-missing-etc-hosts.diff

3 years agolocal-nss-overflow
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
local-nss-overflow

2009-01-12  Arthur Loiret  <aloiret@debian.org>

nss/nss_files/files-parse.c: Include <limits.h>.
(INT_FIELD): Convert field to uintmax_t and check for 32-bit overflow.
(INT_FIELD_MAYBE_NULL): Likewise.

Gbp-Pq: Topic any
Gbp-Pq: Name local-nss-overflow.diff

3 years agolocal-tst-mktime2
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
local-tst-mktime2

Gbp-Pq: Topic any
Gbp-Pq: Name local-tst-mktime2.diff

3 years agolocal-tcsetaddr
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
local-tcsetaddr

# All lines beginning with `# DP:' are a description of the patch.
# DP: Description: tcsetattr sanity check on PARENB/CREAD/CSIZE for ptys
# DP: Related bugs: 218131
# DP: Author: Jeff Licquia <licquia@progeny.com>
# DP: Upstream status: [In CVS | Debian-Specific | Pending | Not submitted ]
# DP: Status Details:
# DP: Date: 2003-10-29

# All lines beginning with `# DP:' are a description of the patch.
# DP: Description: tcsetattr sanity check on PARENB/CREAD/CSIZE for ptys
# DP: Related bugs: 218131
# DP: Author: Jeff Licquia <licquia@progeny.com>
# DP: Upstream status: [In CVS | Debian-Specific | Pending | Not submitted ]
# DP: Status Details:
# DP: Date: 2003-10-29

Gbp-Pq: Topic any
Gbp-Pq: Name local-tcsetaddr.diff

3 years agolocal-stubs_h
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
local-stubs_h

Gbp-Pq: Topic any
Gbp-Pq: Name local-stubs_h.diff

3 years agolocal-nss-upgrade
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
local-nss-upgrade

# DP: This patch makes future upgrades easier. It resolves problems with
# DP: running daemons having NSS modules upgraded out from under them.

# DP: This patch makes future upgrades easier. It resolves problems with
# DP: running daemons having NSS modules upgraded out from under them.

Gbp-Pq: Topic any
Gbp-Pq: Name local-nss-upgrade.diff

3 years agolocal-ldconfig
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
local-ldconfig

# DP: Make it so that a missing /etc/ld.so.conf does not cause an error
# DP: message, unless --verbose is enabled. This keeps the debian
# DP: installer from barfing during bootstrap of the system.
# DP:
# DP: Updated by gotom, the previous one seems being wrong because it suppresses
# DP: _all_ warnings about "can't open configuration file". otoh, I introduce
# DP: newer patches.  it should be checked using chroot and should be contacted
# DP: to the upstream.
# DP: Date: (Updated 2005-01-02 gotom)

# DP: Make it so that a missing /etc/ld.so.conf does not cause an error
# DP: message, unless --verbose is enabled. This keeps the debian
# DP: installer from barfing during bootstrap of the system.
# DP:
# DP: Updated by gotom, the previous one seems being wrong because it suppresses
# DP: _all_ warnings about "can't open configuration file". otoh, I introduce
# DP: newer patches.  it should be checked using chroot and should be contacted
# DP: to the upstream.
# DP: Date: (Updated 2005-01-02 gotom)

# previous patch.
#--- elf/ldconfig.c 2003-07-08 23:26:27.000000000 +0900
#+++ elf/ldconfig.c.debian 2003-07-08 23:29:43.000000000 +0900
#@@ -920,26 +920,24 @@
# {
#   FILE *file = NULL;
#   char *line = NULL;
#-  const char *canon;
#+  const char *canon = filename;
#   size_t len = 0;
#+  int file_fd;
#
#   if (opt_chroot)
#     {
#       canon = chroot_canon (opt_chroot, filename);
#-      if (canon)
#- file = fopen (canon, "r");
#-      else
#+      if (!canon)
#  canon = filename;
#     }
#-  else
#-    {
#-      canon = filename;
#-      file = fopen (filename, "r");
#-    }
#+
#+  if ((file_fd = open(canon, O_RDONLY | O_EXCL, 0022)) != -1)
#+    file = fdopen (file_fd, "r");
#
#   if (file == NULL)
#     {
#-      error (0, errno, _("Can't open configuration file %s"), canon);
#+      if (opt_verbose)
#+ error (0, errno, _("Can't open configuration file %s"), canon);
#       if (canon != filename)
#  free ((char *) canon);
#       return;

2004-10-25  GOTO Masanori  <gotom@debian.or.jp>

        * elf/ldconfig.c: Don't print error when default ld.so.conf
          is not existed.

Gbp-Pq: Topic any
Gbp-Pq: Name local-ldconfig.diff

3 years agolocal-ldso-disable-hwcap
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
local-ldso-disable-hwcap

# DP: Allow hwcap's to be disabled with the existence of a file. This
# DP: makes it easier to do upgrades with optimized (hwcap) library
# DP: packages.
# DP: Author: Rewritten by Daniel Jacobowitz <dan@debian.org>
# DP: Upstream status: Debian-Specific
# DP: Status Details: This isn't going to be acceptable upstream, we
# DP:                 only need it because we support in-place upgrades.
# DP: Date: 2003-10-28, (Updated 2005-01-02 gotom, 2007-05-20 aurel32)

# DP: Allow hwcap's to be disabled with the existence of a file. This
# DP: makes it easier to do upgrades with optimized (hwcap) library
# DP: packages.
# DP: Author: Rewritten by Daniel Jacobowitz <dan@debian.org>
# DP: Upstream status: Debian-Specific
# DP: Status Details: This isn't going to be acceptable upstream, we
# DP:                 only need it because we support in-place upgrades.
# DP: Date: 2003-10-28, (Updated 2005-01-02 gotom, 2007-05-20 aurel32)

Gbp-Pq: Topic any
Gbp-Pq: Name local-ldso-disable-hwcap.diff

3 years agolocal-ld-multiarch
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
local-ld-multiarch

2012-05-01  Aurelien Jarno  <aurelien@aurel32.net>

* elf/Makefile(trusted-dirs.st): Fix DL_DST_LIB computation with
two level slibdir directories.

2009-09-08  Aurelien Jarno  <aurelien@aurel32.net>

* Makeconfig: add support for multiarch compat directories.

Gbp-Pq: Topic any
Gbp-Pq: Name local-ld-multiarch.diff

3 years agolocal-fhs-nscd
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
local-fhs-nscd

Gbp-Pq: Topic any
Gbp-Pq: Name local-fhs-nscd.diff

3 years agolocal-fhs-linux-paths
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
local-fhs-linux-paths

# DP: Description: Correct linux paths for FHS
# DP: Author: Unknown
# DP: Upstream status: Debian-Specific
# DP: Status Details: GNU doesn't follow the FHS.
# DP: Date: Unknown

# DP: Description: Correct linux paths for FHS
# DP: Author: Unknown
# DP: Upstream status: Debian-Specific
# DP: Status Details: GNU doesn't follow the FHS.
# DP: Date: Unknown

Gbp-Pq: Topic any
Gbp-Pq: Name local-fhs-linux-paths.diff

3 years agolocal-bindresvport_blacklist
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
local-bindresvport_blacklist

Patch from the OpenSUSE glibc

Gbp-Pq: Topic any
Gbp-Pq: Name local-bindresvport_blacklist.diff

3 years agolocal-asserth-decls
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
local-asserth-decls

# DP: Description: /usr/include/assert.h
# DP: One must be allowed to include <assert.h> multiple times with different
# DP: values for NDEBUG, so the file is not protected against multiple
# DP: inclusions.  Unfortunately this means that the declarations for
# DP: __assert_fail() and the like may occur multiple times in a compilation
# DP: unit, causing gcc to issue a batch of warnings.
# DP: I believe this can be fixed by protecting the declarations (but only
# DP: those declarations) against repetition.
# DP: Author: Jeroen T. Vermeulen <jtv@xs4all.nl>
# DP: Upstream status: Not submitted
# DP: Status Details: Plan to submit
# DP: Date: 2003-01-01

# DP: Description: /usr/include/assert.h
# DP: One must be allowed to include <assert.h> multiple times with different
# DP: values for NDEBUG, so the file is not protected against multiple
# DP: inclusions.  Unfortunately this means that the declarations for
# DP: __assert_fail() and the like may occur multiple times in a compilation
# DP: unit, causing gcc to issue a batch of warnings.
# DP: I believe this can be fixed by protecting the declarations (but only
# DP: those declarations) against repetition.
# DP: Author: Jeroen T. Vermeulen <jtv@xs4all.nl>
# DP: Upstream status: Not submitted
# DP: Status Details: Plan to submit
# DP: Date: 2003-01-01

Gbp-Pq: Topic any
Gbp-Pq: Name local-asserth-decls.diff

3 years agoInstall ld.so to slibdir instead of rtlddir to fix cross builds
Adam Conrad [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
Install ld.so to slibdir instead of rtlddir to fix cross builds

When installing a cross-libc purely for linking purposes but not
runtime use, the linker shouldn't be installed in rtlddir, since
we won't actually be USING it, and thus referencing the rtlddir
path in libc.so ends up blowing up cross-compilers for no reason.

Gbp-Pq: Topic any
Gbp-Pq: Name local-rtlddir-cross.diff

3 years agosubmitted-po-fr-fixes
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
submitted-po-fr-fixes

2014-05-05  Aurelien Jarno  <aurelien@aurel32.net>

* po/fr.po: Fix French translation of inappropriate.

Gbp-Pq: Topic all
Gbp-Pq: Name submitted-po-fr-fixes.diff

3 years agolocal-nis-shadow
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
local-nis-shadow

Gbp-Pq: Topic all
Gbp-Pq: Name local-nis-shadow.diff

3 years agolocal-ldd
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
local-ldd

2013-05-11  Aurelien Jarno  <aurelien@aurel32.net>

* elf/ldd.bash.in: Verify the dynamic linker is working before
using it.

Gbp-Pq: Topic all
Gbp-Pq: Name local-ldd.diff

3 years agolocal-ru_RU
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
local-ru_RU

# DP: Description: Change default charset for 'russian' locale alias
# DP: Related bugs: #62586
# DP: Dpatch author: Ben Collins
# DP: Patch author: Alistair McKinstry
# DP: Upstream status: Submitted
# DP: Status Details: http://sources.redhat.com/bugzilla/show_bug.cgi?id=120
# DP: Date: 2002-03-10

# DP: Description: Change default charset for 'russian' locale alias
# DP: Related bugs: #62586
# DP: Dpatch author: Ben Collins
# DP: Patch author: Alistair McKinstry
# DP: Upstream status: Submitted
# DP: Status Details: http://sources.redhat.com/bugzilla/show_bug.cgi?id=120
# DP: Date: 2002-03-10

Gbp-Pq: Topic all
Gbp-Pq: Name local-ru_RU.diff

3 years agolocal-remove-manual
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
local-remove-manual

The GNU Libc Reference manual has to be removed for licensing reasons.
But some files have a dependency on manual/errno.texi; the easiest
solution is to drop those dependencies and make sure that MAKEINFO=:
so that no target depends on manual/*.texi files.

Gbp-Pq: Topic all
Gbp-Pq: Name local-remove-manual.diff

3 years agolocal-alias-et_EE
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
local-alias-et_EE

Gbp-Pq: Topic all
Gbp-Pq: Name local-alias-et_EE.diff

3 years agosubmitted-sparc64-socketcall
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
submitted-sparc64-socketcall

2016-03-01  Aurelien Jarno  <aurelien@aurel32.net>

* sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list (bind, listen,
setsockopt): Remove.

Gbp-Pq: Topic sparc
Gbp-Pq: Name submitted-sparc64-socketcall.diff

3 years agolocal-fpscr_values
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
local-fpscr_values

Gbp-Pq: Topic sh4
Gbp-Pq: Name local-fpscr_values.diff

3 years agogit-thread-debugging
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
git-thread-debugging

2018-08-06  Andreas Schwab  <schwab@suse.de>

* sysdeps/riscv/nptl/tls.h (DB_THREAD_SELF): Use REGISTER instead
of CONST_THREAD_AREA.

Gbp-Pq: Topic riscv64
Gbp-Pq: Name git-thread-debugging.diff

3 years agolocal-powerpc8xx-dcbz
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
local-powerpc8xx-dcbz

Gbp-Pq: Topic powerpc
Gbp-Pq: Name local-powerpc8xx-dcbz.diff

3 years agosubmitted-rld_map
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
submitted-rld_map

2010-05-20  Aurelien Jarno  <aurelien@aurel32.net>

* sysdeps/mips/dl-machine.h (ELF_MACHINE_DEBUG_SETUP): test for
RLD_MAP pointer before using it.

Gbp-Pq: Topic mips
Gbp-Pq: Name submitted-rld_map.diff

3 years agosubmitted-gcc34-seccomment
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
submitted-gcc34-seccomment

# DP: Description: Make glibc-2.3.5 compile with gcc-3.4/4.0 + binutils 2.16

# DP: Description: Make glibc-2.3.5 compile with gcc-3.4/4.0 + binutils 2.16
#    on m68k fixed by adding #APP.
# DP: Related bugs:
# DP: Dpatch author: GOTO Masanori <gotom@debian.org>
# DP: Patch author: Andreas Schwab <schwab@suse.de>
# DP: Upstream status: Pending
# DP: Status Details:
# DP: Date: 2005-08-03

From: Andreas Schwab <schwab@suse.de>

Gbp-Pq: Topic m68k
Gbp-Pq: Name submitted-gcc34-seccomment.diff

3 years agolocal-reloc
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
local-reloc

# DP: Description: binutils bug workaround
# DP: Related bugs: #263601: m68k: workaround for binutils problem
# DP: Dpatch author: Roman Zippel <zippel@linux-m68k.org>
# DP: Patch author: Richard Zidlicky <rz@linux-m68k.org>
# DP: Upstream status: Debian-Specific
# DP: Status Details: Actual fix is to modify m68k binutils.
# DP: Date: 2004-08-09

# DP: Description: binutils bug workaround
# DP: Related bugs: #263601: m68k: workaround for binutils problem
# DP: Dpatch author: Roman Zippel <zippel@linux-m68k.org>
# DP: Patch author: Richard Zidlicky <rz@linux-m68k.org>
# DP: Upstream status: Debian-Specific
# DP: Status Details: Actual fix is to modify m68k binutils.
# DP: Date: 2004-08-09

Gbp-Pq: Topic m68k
Gbp-Pq: Name local-reloc.diff

3 years agolocal-dwarf2-buildfix
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
local-dwarf2-buildfix

# DP: Description: Adding empty m68k framestate.c not to build for dwarf2.
# DP: Related bugs:
# DP: Dpatch author: GOTO Masanori <gotom@debian.org>
# DP: Patch author: GOTO Masanori <gotom@debian.org>
# DP: Upstream status: Debian-Specific
# DP: Status Details: m68k uses sjlj exceptions, not dwarf2 unwind.
# DP: This patch adds empty framestate.c for m68k to avoid
# DP: dwarf2 build failure.
# DP: Date: 2003-07-19 (Update 2005-03-16 gotom)

# DP: Description: Adding empty m68k framestate.c not to build for dwarf2.
# DP: Related bugs:
# DP: Dpatch author: GOTO Masanori <gotom@debian.org>
# DP: Patch author: GOTO Masanori <gotom@debian.org>
# DP: Upstream status: Debian-Specific
# DP: Status Details: m68k uses sjlj exceptions, not dwarf2 unwind.
# DP: This patch adds empty framestate.c for m68k to avoid
# DP: dwarf2 build failure.
# DP: Date: 2003-07-19 (Update 2005-03-16 gotom)

2005-03-16  GOTO Masanori  <gotom@debian.org>

* sysdeps/m68k/unwind-pe.c: Update to fix compilation failure.

2003-07-19  GOTO Masanori  <gotom@debian.org>

* sysdeps/m68k/framestate.c: Add to fix compilation failure
with sjlj exception, suggested by Philip Blundell.

Gbp-Pq: Topic m68k
Gbp-Pq: Name local-dwarf2-buildfix.diff

3 years agolocal-no-execfn
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
local-no-execfn

AT_EXECFN is Linux specific

Gbp-Pq: Topic kfreebsd
Gbp-Pq: Name local-no-execfn.diff

3 years agolocal-getaddrinfo-freebsd-kernel
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
local-getaddrinfo-freebsd-kernel

Gbp-Pq: Topic kfreebsd
Gbp-Pq: Name local-getaddrinfo-freebsd-kernel.diff

3 years agolocal-scripts
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
local-scripts

Gbp-Pq: Topic kfreebsd
Gbp-Pq: Name local-scripts.diff

3 years agolocal-fbtl-depends
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
local-fbtl-depends

Gbp-Pq: Topic kfreebsd
Gbp-Pq: Name local-fbtl-depends.diff

3 years agolocal-fbtl
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
local-fbtl

Gbp-Pq: Topic kfreebsd
Gbp-Pq: Name local-fbtl.diff

3 years agolocal-sysdeps
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
local-sysdeps

Gbp-Pq: Topic kfreebsd
Gbp-Pq: Name local-sysdeps.diff

3 years agolocal-grantpt
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
local-grantpt

Gbp-Pq: Topic kfreebsd
Gbp-Pq: Name local-grantpt.diff

3 years agolocal-config_h_in
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
local-config_h_in

2009-05-23  Aurelien Jarno <aurelien@aurel32.net>

* config.h.in (__KFREEBSD_KERNEL_VERSION): Add.

Gbp-Pq: Topic kfreebsd
Gbp-Pq: Name local-config_h_in.patch

3 years agosubmitted-auxv
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
submitted-auxv

https://sourceware.org/bugzilla/show_bug.cgi?id=15794

Gbp-Pq: Topic kfreebsd
Gbp-Pq: Name submitted-auxv.diff

3 years agosubmitted-waitid
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
submitted-waitid

Gbp-Pq: Topic kfreebsd
Gbp-Pq: Name submitted-waitid.diff

3 years agounsubmitted-quiet-ldconfig
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
unsubmitted-quiet-ldconfig

Gbp-Pq: Topic i386
Gbp-Pq: Name unsubmitted-quiet-ldconfig.diff

3 years agolocal-biarch
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
local-biarch

# DP: Description: Allow ldconfig to work on i386/x86-64 biarch systems
# DP: Related bugs:
# DP: Dpatch author: Daniel Jacobowitz
# DP: Patch author: Daniel Jacobowitz
# DP: Upstream status: Debian-Specific
# DP: Status Details: based on Ubuntu change by Jeff Bailey
# DP: Date: 2005-10-13

# DP: Description: Allow ldconfig to work on i386/x86-64 biarch systems
# DP: Related bugs:
# DP: Dpatch author: Daniel Jacobowitz
# DP: Patch author: Daniel Jacobowitz
# DP: Upstream status: Debian-Specific
# DP: Status Details: based on Ubuntu change by Jeff Bailey
# DP: Date: 2005-10-13

Gbp-Pq: Topic i386
Gbp-Pq: Name local-biarch.diff

3 years agogit-renameat2
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
git-renameat2

commit 1b2184177553ce4ef8458034927ef50854be2af6
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Wed Feb 27 07:53:13 2019 -0800

    hurd: Add renameat2 support for RENAME_NOREPLACE

            * include/stdio.h (__renameat2): New hidden prototype.
            * stdio-common/renameat2.c (__renameat2): Add hidden definition.
            * sysdeps/mach/hurd/renameat.c (__renameat): Move implementation to...
            * sysdeps/mach/hurd/renameat2.c (__renameat2): ... new function, and
            add support for RENAME_NOREPLACE.
            * sysdeps/unix/sysv/linux/renameat2.c (__renameat2): Add hidden definition.

Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name git-renameat2.diff

3 years agogit-altstack
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
git-altstack

commit a0bb5abd09e3d0f66c3dccf70bf74c8b2d7cc1c2
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Thu Jan 24 19:27:00 2019 +0100

    hurd: Fix initial sigaltstack state

            * hurd/hurdsig.c (_hurd_thread_sigstate): Set SS_DISABLE in
            sigaltstack.ss_flags.

Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name git-altstack.diff

3 years agogit-AT_EMPTY_PATH
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
git-AT_EMPTY_PATH

commit ee4d79026da2c21c75cccd5795cb4357643f4f5c
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Tue Jan 22 23:38:36 2019 +0100

    hurd: Support AT_EMPTY_PATH

            * hurd/lookup-at.c (__file_name_lookup_at): When at_flags contains
            AT_EMPTY_PATH, call __dir_lookup and __hurd_file_name_lookup_retry
            directly instead of __hurd_file_name_lookup.

Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name git-AT_EMPTY_PATH.diff

3 years agogit-libpthread_setpshared
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
git-libpthread_setpshared

commit 55137f7dd939bc8403a63f4cade73ff90575b821
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Wed Jan 2 22:21:34 2019 +0100

    hurd: advertise *_setpshared as not supported

    The functions themselves return 0, but initializing a mutex/etc with       .
    pshared set to 1 will fail anyway                                          .

            * sysdeps/htl/pt-barrierattr-setpshared.c
            (pthread_barrierattr_setpshared): Add stub warning.
            * sysdeps/htl/pt-condattr-setpshared.c
            (pthread_condattr_setpshared): Likewise.
            * sysdeps/htl/pt-mutexattr-setpshared.c
            (pthread_mutexattr_setpshared): Likewise.
            * sysdeps/htl/pt-rwlockattr-setpshared.c
            (pthread_rwlockattr_setpshared): Likewise.
            * sysdeps/mach/hurd/htl/pt-mutexattr-setpshared.c
            (pthread_mutexattr_setpshared): Likewise.

Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name git-libpthread_setpshared.diff

3 years ago[PATCH] Make F_RDLCK/F_WRLCK atomic
Samuel Thibault [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
[PATCH] Make F_RDLCK/F_WRLCK atomic

lockf(LOCK_EX) would for instance drop any existing shared lock before taking
the exclusive lock. F_RDLCK/F_WRLCK need atomic changes, so introduce and use
__LOCK_ATOM

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* misc/sys/file.h (__LOCK_ATOMIC): New macro.
* sysdeps/mach/hurd/fcntl.c (__libc_fcntl): Use __LOCK_ATOMIC along LOCK_SH and
LOCK_EX.

XXX: Adding to misc/sys/file.h is questionable

Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name tg-WRLCK-upgrade.diff

3 years agogit-lockf-0
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
git-lockf-0

commit b15b1a959040fe8cdfbc51092a7b72032f6c9b86
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Mon Nov 19 20:22:30 2018 +0100

    hurd: Support lockf at offset 0 with size 0 or 1.

            * sysdeps/mach/hurd/f_setlk.c: Include <unistd.h>.
            (__f_setlk): When whence is SEEK_CUR, use __lseek64 to convert it to
            SEEK_SET.

Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name git-lockf-0.diff

3 years agogit-fcntl64
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
git-fcntl64

commit 346ef23f197a0c8ba807c344bd39101b711050ee
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Thu Nov 15 00:52:36 2018 +0100

    hurd: Fix F_*LK* fcntl with __USE_FILE_OFFSET64

    struct flock64 uses 64bit values. This introduces other values for F_GETLK,
    F_SETLK, F_SETLKW to distinguish between both.

            * sysdeps/mach/hurd/bits/fcntl.h (F_GETLK64, F_SETLK64, F_SETLKW64): New
            macros
            [__USE_FILE_OFFSET64] (F_GETLK, F_SETLK, F_SETLKW): Define to F_GETLK64,
            F_SETLK64, F_SETLKW64, respectively.
            * sysdeps/mach/hurd/f_setlk.c: New file.
            * sysdeps/mach/hurd/f_setlk.h: New file.
            * sysdeps/mach/hurd/Makefile [$(subdir) = io] (sysdeps_routines): Add
            f_setlk.
            * sysdeps/mach/hurd/fcntl.c: Include "f_setlk.h".h".
            (__libc_fcntl): Move non-flock operations to...
            * sysdeps/mach/hurd/vfcntl.c (__libc_vfcntl): ... New file.

Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name git-fcntl64.diff

3 years agogit-tst-preadvwritev2-common.c
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
git-tst-preadvwritev2-common.c

commit 18ad0de6513bf8a8e4ba757c069e6806d07920f8
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Tue Oct 23 14:53:12 2018 -0300

    Fix tst-preadvwritev2 build failure on HURD

    Commit 7a16bdbb9ff41 uses IOV_MAX, which is not defined on hurd.

    Checked on a build for i686-gnu.

            * misc/tst-preadvwritev2-common.c (IOV_MAX): Define if not
            defined.

Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name git-tst-preadvwritev2-common.c.diff

3 years agogit-spawn-open
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
git-spawn-open

commit 7fa495cdf750c257ed897eca189aabc3a62d5f2b
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Sat Nov 10 11:20:12 2018 +0000

    Hurd: Fix ulinks in fd table reallocation

            * hurd/hurd/userlink.h (_hurd_userlink_move): New function.
            * hurd/hurd/port.h (_hurd_port_move): New function.
            * sysdeps/mach/hurd/spawni.c (NEW_ULINK_TABLE): New macro.
            (EXPAND_DTABLE): Use NEW_ULINK_TABLE macro for ulink_dtable.

commit 278fdabd8c45dc215222facd36febfc3f6f2a95d
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Sun Nov 11 20:08:29 2018 +0100

    hurd: Fix spawni's user_link reallocation

    * hurd/hurd/userlink.h (_hurd_userlink_move): Make new_link's
    predecessor point to new_link instead of link.

Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name git-spawn-open.diff

3 years agogit-msync
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
git-msync

commit 2e96e9808eb6e76304907123455668894147d836
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Sat Nov 3 22:47:57 2018 +0100

    hurd: Support msync

            * sysdeps/mach/hurd/msync.c: New file.

Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name git-msync.diff

3 years agogit-pci
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
git-pci

commit fc783076ec496a55c029be14617ea16a24589f55
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Wed Oct 31 22:43:44 2018 +0100

    hurd: Add pci RPC stubs

            * hurd/Makefile (user-interfaces): Add pci.

Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name git-pci.diff

3 years agogit-intr-msg
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
git-intr-msg

commit 32ad5b3328e0ce53ca27e185a89ca44c1d0acd0c
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Tue Oct 9 23:40:09 2018 +0200

    hurd: Fix race between calling RPC and handling a signal

            * sysdeps/mach/hurd/i386/intr-msg.h (INTR_MSG_TRAP): Make
            _hurd_intr_rpc_msg_about_to global point to start of controlled
            assembly snippet. Make it check canceled flag again.
            * hurd/hurdsig.c (_hurdsig_abort_rpcs): Only mutate thread if it passed the
            _hurd_intr_rpc_msg_about_to point.
            * hurd/intr-msg.c (_hurd_intr_rpc_mach_msg): Remove comment on mutation
            issue.

Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name git-intr-msg.diff

3 years agogit-interrupt_timeout
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
git-interrupt_timeout

commit 6849ff19657e8f7e6a83e9aaae07eb45269dc7d4
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Tue Oct 9 22:27:59 2018 +0200

    hurd: set interrupt timeout to 1 minute

    Seeing a server not able to get interrupted for 3s is not so surprising when
    e.g. a lot of writes are happening. 1 minute allows to actually notice the
    issue and be able to debug it.

            * hurd/hurdsig.c (_hurd_interrupted_rpc_timeout): Set to 60000.

Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name git-interrupt_timeout.diff

3 years agogit-interrupt_timeout_EIO
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
git-interrupt_timeout_EIO

commit 16d61b858ec0e802008d721e150e48d6083d3921
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Tue Oct 9 22:25:19 2018 +0200

    hurd: Return EIEIO on non-responding interrupted servers

    since we do not actually know whether the RPC was completed or not,
    which makes a huge difference for e.g. write(), so better really error
    out than letting caller think that the RPC did not happen.

            * hurd/intr-msg.c (_hurd_intr_rpc_mach_msg): When the server does not
            answer to interrupt_operation, return EIEIO instead of EINTR.

Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name git-interrupt_timeout_EIO.diff

3 years agolocal-hurd_sigstate-PLT
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
local-hurd_sigstate-PLT

===================================================================

Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name local-hurd_sigstate-PLT.diff

3 years agoEnable global signal distribution in htl
Samuel Thibault [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
Enable global signal distribution in htl

* sysdeps/mach/hurd/htl/pt-sigstate-init.c (__pthread_sigstate_init):
Call _hurd_sigstate_set_global_rcv().
* sysdeps/mach/hurd/htl/pt-sigstate-destroy.c
(__pthread_sigstate_destroy): Call _hurd_sigstate_delete().
* sysdeps/mach/hurd/htl/pt-sigstate.c: Include <hurd/msg.h>
(__pthread_sigstate): Use _hurd_sigstate_lock()/_hurd_sigstate_unlock()
and _hurd_sigstate_pending(). Call __msg_sig_post() to wake up thread
with pending signals.
* sysdeps/mach/hurd/Makefile (LDLIBS-pthread.so): Add
$(objdir)/hurd/libhurduser.so.

Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name libpthread_sigs.diff

3 years agolocal-exec_filename
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
local-exec_filename

Keep compatibility with experimental implementation

Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name local-exec_filename.diff

3 years agolocal-no_unsupported_ioctls
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
local-no_unsupported_ioctls

These ioctls are not actually supported (and will probably not be in the
close future), and are not available on Linux either, so don't expose
them to application at the risk of them complaining that they don't work
(e.g. xterm using TIOCLSET).

Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name local-no_unsupported_ioctls.diff

3 years ago[PATCH] hurd: Handle `pid' magical lookup retry
Justus Winter [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
[PATCH] hurd: Handle `pid' magical lookup retry

        * hurd/lookup-retry.c: Handle `pid' magical lookup
        retry.

Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name git-magic-pid.diff

3 years ago[PATCH] XXX: make libc_rwlock recursive
Samuel Thibault [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
[PATCH] XXX: make libc_rwlock recursive

Without making the rwlocks recursive, running fakeroot-tcp gets this:

#0  0x0106e91c in mach_msg_trap () at /usr/src/glibc-2.24/build-tree/hurd-i386-libc/mach/mach_msg_trap.S:2
#1  0x0106f090 in __mach_msg (msg=0x20034a0, option=3, send_size=64, rcv_size=32, rcv_name=421, timeout=0, notify=0) at msg.c:110
#2  0x0125a241 in __gsync_wait (task=1, addr=19101080, val1=2, val2=0, msec=0, flags=0)
    at /usr/src/glibc-2.24/build-tree/hurd-i386-libc/mach/RPC_gsync_wait.c:175
#3  0x010b0743 in __dcigettext (domainname=0x8050740 <_libc_intl_domainname@@GLIBC_2.2.6> "libc",
    msgid1=0x8051d88 "undefined symbol: acl_get_fd", msgid2=0x0, plural=0, n=0, category=5) at dcigettext.c:527
#4  0x010af776 in __dcgettext (domainname=0x8050740 <_libc_intl_domainname@@GLIBC_2.2.6> "libc",
    msgid=0x8051d88 "undefined symbol: acl_get_fd", category=5) at dcgettext.c:47
#5  0x0124e427 in __dlerror () at dlerror.c:94
#6  0x01035ae3 in load_library_symbols () from /usr/lib/i386-gnu/libfakeroot/libfakeroot-tcp.so
#7  0x01035cc3 in tmp___fxstat64 () from /usr/lib/i386-gnu/libfakeroot/libfakeroot-tcp.so
#8  0x01036cd6 in __fxstat64 () from /usr/lib/i386-gnu/libfakeroot/libfakeroot-tcp.so
#9  0x010ad831 in _nl_load_locale_from_archive (category=category@entry=0, namep=namep@entry=0x200399c) at loadarchive.c:211
#10 0x010ac45b in _nl_find_locale (locale_path=0x0, locale_path_len=0, category=category@entry=0, name=0x200399c) at findlocale.c:154
#11 0x010abde7 in setlocale (category=0, locale=0x804c2e4 "") at setlocale.c:417
#12 0x0804947f in main (argc=2, argv=0x2003ad4) at programs/locale.c:191

That's very unfortunate: libfakeroot gets initialized from a section
where __libc_setlocale_lock is already locked, and thus the dlerror()
call hangs inside __dcigettext. It happens that Linux doesn't have
the problem probably because pthread_rwlock_wrlock returns a EDEADLK
error instead of hanging, and then the first unlock unlocks, and the
second unlock probably returns an EINVAL. This is all very unsafe, but
that's fakeroot-tcp's matter (see http://bugs.debian.org/845930 for the
follow-up)...

We only use it when constructing the debian installer for -s -r options
anyway.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name tg-libc_rwlock_recursive.diff

3 years ago[PATCH] Fix SS_ONSTACK support
Samuel Thibault [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
[PATCH] Fix SS_ONSTACK support

* sysdeps/mach/hurd/i386/sigreturn.c (__sigreturn2): New function,
unlocks SS and returns to the saved PC.
(__sigreturn): Do not unlock SS, and "return" into __sigreturn2 on the
thread stack instead of the saved PC.

Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name tg-ONSTACK.diff

3 years agotg-eintr
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
tg-eintr

commit 230b85f414291ac955827aba15cfbd103ab6ebdd
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Thu Jun 9 01:15:10 2016 +0200

    Fix pipe() call returning EINTR sometimes

    because it uses a critical section

Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name tg-eintr.diff

3 years agolocal-mach_print
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
local-mach_print

Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name local-mach_print.diff

3 years agotg-bootstrap
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
tg-bootstrap

This dependency is missing, but would pose problem on Darwin

Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name tg-bootstrap.diff

3 years agosubmitted-bind_umask2
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
submitted-bind_umask2

2014-08-27  Samuel Thibault  <samuel.thibault@ens-lyon.org>

Fix bind when umask is e.g. 0777.

        * sysdeps/mach/hurd/bind.c (__bind): Pass mode 0666 to __dir_mkfile
        instead of final mode, so that call __ifsock_getsockaddr can always
        succeed, before calling __file_chmod to fix the mode according to umask,
        before calling __dir_link to show the file.

Part of the original fix was committed, the other hasn't been yet, see Roland's
"Harumph" reply to
https://sourceware.org/ml/libc-alpha/2014-08/msg00408.html

Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name submitted-bind_umask2.diff

3 years ago[PATCH] Hurd: make sigstates hold a reference on thread ports
Richard Braun [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
[PATCH] Hurd: make sigstates hold a reference on thread ports

This change is required in order to correctly release per-thread
resources. Directly reusing the threading library reference isn't
possible since the sigstate is also used early in the main thread,
before threading is initialized.

* hurd/hurd/signal.h (_hurd_self_sigstate): Drop thread reference after
calling _hurd_thread_sigstate.
(_hurd_critical_section_lock): Likewise.
* hurd/hurdsig.c (_hurd_thread_sigstate): Add a reference on the thread.
(_hurd_sigstate_delete): Drop thread reference.

Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name tg-sigstate_thread_reference.diff

3 years agosubmitted-path_mounted
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
submitted-path_mounted

http://sourceware.org/ml/libc-alpha/2013-08/msg00207.html

To: libc-alpha@sourceware.org
Subject: [PATCH 2/2] Define _PATH_MOUNTED as "/etc/mtab"
Date: Thu, 15 Aug 2013 10:43:35 +0200

Change the definition of _PATH_MOUNTED to "/etc/mtab". This is the
value used on Linux.

The change is motivated by the fact that on Debian /etc/mtab is a
symbolic link to /proc/mounts. This patch adjusts the macro for
non-linux systems such as Hurd. Changing this using
sysdeps/mach/hurd/paths.h causes build problems because
/usr/include/hurd/paths.h is shadowed by this file. This change is
proposed in the hope that aligning the non-linux targets with the
glibc for Linux is perceived as a good thing while fixing this problem
on Debian/Hurd along the way.

* sysdeps/generic/paths.h (_PATH_MOUNTED): Change value to "/etc/mtab".

Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name submitted-path_mounted.diff

3 years agounsubmitted-clock_t_centiseconds
GNU Libc Maintainers [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
unsubmitted-clock_t_centiseconds

Some applications assume centisecond precision, or at most millisecond precision
(e.g. guile).  This is a work-around for them.

Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name unsubmitted-clock_t_centiseconds.diff

3 years agoFix poll and select POSIX compliancy details about errors
Samuel Thibault [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
Fix poll and select POSIX compliancy details about errors

This fixes the following:

This fixes the following:

- On error, poll must not return without polling, including EBADF, and instead
report POLLHUP/POLLERR/POLLNVAL
- Select must report EBADF if some set contains an invalid FD.

The idea is to move error management to after all select calls, in the
poll/select final treatment. The error is instead recorded in a new `error'
field, and a new SELECT_ERROR bit set.

Thanks Svante Signell for the initial version of the patch.

* hurd/hurdselect.c (SELECT_ERROR): New macro.
(_hurd_select):
- Add `error' field to `d' structures array.
- If a poll descriptor is bogus, set EBADF, but continue with a zero timeout.
- Go through the whole fd_set, not only until _hurd_dtablesize. Return EBADF
there is any bit set above _hurd_dtablesize.
- Do not request io_select on bogus descriptors (SELECT_ERROR).
- On io_select request error, record the error.
- On io_select bogus reply, use EIO error code.
- On io_select bogus or error reply, record the error.
- Do not destroy reply port for bogus FDs.
- On error, make poll set POLLHUP in the EPIPE case, POLLNVAL in the EBADF
case, or else POLLERR.
- On error, make select simulated readiness.

Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name tg-poll_errors_fixes.diff

3 years agoFix timeout handling in _hurd_select
Richard Braun [Sat, 8 Oct 2022 15:53:16 +0000 (16:53 +0100)]
Fix timeout handling in _hurd_select

Rely on servers to implement timeouts, so that very short values (including
0) don't make mach_msg return before valid replies can be received. The
purpose of this scheme is to guarantee a full client-server round-trip,
whatever the timeout value.

This change depends on the new io_select_timeout RPC being implemented by
servers.

* hurd/Makefile (user-interfaces): Add io_reply and io_request.
* hurd/hurdselect.c: Include <sys/time.h>, <hurd/io_request.h> and <limits.h>.
(_hurd_select): Replace the call to __io_select with either __io_select_request
or __io_select_timeout_request, depending on the timeout. Count the number of
ready descriptors (replies for which at least one type bit is set). Implement
the timeout locally when there is no file descriptor.

TODO: see XXX

Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name tg-io_select_timeout.diff