Florian Weimer [Fri, 19 Feb 2021 12:29:00 +0000 (13:29 +0100)]
string: Work around GCC PR 98512 in rawmemchr
Lukasz Majewski [Mon, 25 Jan 2021 12:48:13 +0000 (13:48 +0100)]
tst: time: Provide Y2038 tests for mktime (tst-mktime4.c)
This change adds new test to assess mktime's functionality.
To be more specific - following use cases are checked:
- Pass struct tm as epoch time
- Pass struct tm as value just before Y2038 threshold (returned
value shall be 0x7FFFFFFF)
- Pass struct tm as the first value after Y2038 threshold
(expected value - 0x80000000)
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Lukasz Majewski [Mon, 25 Jan 2021 11:51:41 +0000 (12:51 +0100)]
tst: Provide test for difftime
This change adds new test to assess difftime's functionality by
adding some arbitrary offsets to current time_t value (read via
time).
If 64 bit time_t is supported, the same procedure is applied around
the threshold of Y2038 time overflow.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Lukasz Majewski [Thu, 21 Jan 2021 08:33:34 +0000 (09:33 +0100)]
tst: Provide test for ctime
This change adds new test to assess ctime's functionality.
To be more specific - following use cases are checked:
- Pass time_t value as 0 to check if epoch time is converted
- Pass time_t as max value for 32 bit systems
- Pass time_t as the first value after Y2038 threshold
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Lukasz Majewski [Mon, 25 Jan 2021 09:26:57 +0000 (10:26 +0100)]
tst: Provide test for sched_rr_get_interval
This change adds new test to assess sched_rr_get_interval's
functionality.
To be more specific - following use cases are checked:
- If the read interval is correct
- If the proper ABI is used - to check if adjacent data is not
overwritten
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Stefan Liebler [Tue, 16 Feb 2021 15:18:56 +0000 (16:18 +0100)]
S390: Add new hwcap values.
The new hwcap values indicate support for arch14 architecture.
Szabolcs Nagy [Mon, 15 Feb 2021 13:10:03 +0000 (13:10 +0000)]
aarch64: Fix sys/ptrace.h if linux headers are included
If the linux asm/ptrace.h is included before sys/ptrace.h that
breaks the newly added declarations there, so undef the names
that may be defined as macros in the linux header.
Florian Weimer [Fri, 12 Feb 2021 17:22:59 +0000 (18:22 +0100)]
elf: Do not copy vDSO soname when setting up link map
The kernel does not put the vDSO at special addresses, so writev can
write the name directly. Also remove the incorrect comment about not
setting l_name.
Andy Lutomirski confirmed in
<https://lore.kernel.org/linux-api/
442A16C0-AE5A-4A44-B261-
FE6F817EAF3C@amacapital.net/>
that this copy is not necessary.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
H.J. Lu [Fri, 12 Feb 2021 15:46:32 +0000 (07:46 -0800)]
x86: Remove the extra space between "# endif"
Remove the extra space between "# endif" left over from
commit
f380868f6dcfdeae8d449d556298d9c41012ed8d
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Thu Dec 24 15:43:34 2020 -0800
Remove _ISOMAC check from <cpu-features.h>
Adhemerval Zanella [Thu, 11 Feb 2021 20:42:14 +0000 (17:42 -0300)]
hurd: Fix fstatfs build failure
It was added by
1bfbaf7130 where it added a libc_hidden_proto for
__fstatfs but it didn't update the Hurd version as well.
Checked with a build for i686-gnu.
Adhemerval Zanella [Sun, 7 Feb 2021 18:45:15 +0000 (18:45 +0000)]
linux: Remove stat-check.c
The check is moved to LFS fstatat implementation (since it is the
code that actually implements the syscall).
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Adhemerval Zanella [Sun, 7 Feb 2021 18:45:12 +0000 (18:45 +0000)]
linux: Remove overflow.h
The header is not used anywhere.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Adhemerval Zanella [Sun, 7 Feb 2021 17:43:02 +0000 (17:43 +0000)]
linux: Consolidate internal_statvfs
Remove the internal_statvfs64.c and open code the implementation
on internal_statvfs.c. The alpha is now unrequired, the generic
implementation also handles it.
Also, remove unused includes on internal_statvfs.c, and remove
unused arguments on __internal_statvfs{64}.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Adhemerval Zanella [Sat, 6 Feb 2021 11:26:28 +0000 (11:26 +0000)]
linux: Consolidate statvfs implementations
There is no need to handle ENOSYS on fstatfs64 call, required only
for alpha (where is already fallbacks to fstatfs).
Checked on x86_64-linux-gnu.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Adhemerval Zanella [Sat, 6 Feb 2021 11:32:57 +0000 (11:32 +0000)]
linux: Consolidate fstatvfs implementations
There is no need to handle ENOSYS on fstatfs64 call, required only
for alpha (where is already fallbacks to fstatfs). The wordsize
internal_statvfs64.c is removed, since how the LFS support is
provided by fstatvfs64.c (used on 64-bit architectures as well).
Checked on x86_64-linux-gnu.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Adhemerval Zanella [Fri, 5 Feb 2021 21:26:57 +0000 (21:26 +0000)]
linux: Consolidate statfs implementations
The __NR_statfs64 syscall is supported on all architectures but
aarch64, mips64, riscv64, and x86_64. And newer ABIs also uses
the new statfs64 interface (where the struct size is used as
second argument).
So the default implementation now uses:
1. __NR_statfs64 for non-LFS call and handle overflow directly
There is no need to handle __NR_statfs since all architectures
that only support are LFS only.
2. __NR_statfs if defined or __NR_statfs64 otherwise for LFS
call.
Alpha is the only outlier, since it is a 64-bit architecture which
provides non-LFS interface and only provides __NR_statfs64 on
newer kernels (v5.1+).
Checked on x86_64-linux-gnu.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Adhemerval Zanella [Fri, 5 Feb 2021 20:13:58 +0000 (20:13 +0000)]
linux: Consolidate fstatfs implementations
The __NR_fstatfs64 syscall is supported on all architectures but
aarch64, mips64, riscv64, and x86_64. And newer ABIs also uses
the new fstatfs64 interface (where the struct size is used as
first argument).
So the default implementation now uses:
1. __NR_fstatfs64 for non-LFS call and handle overflow directly
There is no need to handle __NR_fstatfs since all architectures
that only support are LFS only.
2. __NR_fstatfs if defined or __NR_fstatfs64 otherwise for LFS
call.
Alpha is the only outlier, it is a 64-bit architecture which
provides non-LFS interface and only provides __NR_fstatfs64 on
newer kernels (5.1+).
Checked on x86_64-linux-gnu.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Adhemerval Zanella [Fri, 5 Feb 2021 18:37:02 +0000 (18:37 +0000)]
linux: Set LFS statfs as default
Currently glibc has three different struct statfs{64} definitions:
1. Non-LFS support where non-LFS and LFS struct have different
size: alpha, arm, hppa, i686, m68k, microblaze, mips (all abis),
powerpc32, s390, sh4, and sparc.
2. Non-LFS support where non-LFS and LFS struct have the same
size: csky and nios2.
3. Only LFS support (where both struct have the same size): arc,
ia64, powerpc64 (including LE), riscv (both 32 and 64 bits),
s390x, sparc64, and x86 (including x32).
The STATFS_IS_STATFS64/__STATFS_MATCHES_STATFS64 does not tell apart
between 1. and 2. since for both the only difference is the struct
size (for 2. both non-LFS and LFS uses the same syscall, where for
1. the old non-LFS is used for [f]statfs).
This patch move the generic statfs.h for both csky and nios2, and
make the default definitions for newer ABIs to assume that only
LFS will be support (so there is no need to keep no-LFS and LFS
struct statfs with the same size, it will be implicit).
This patch does not change the code generation.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Adhemerval Zanella [Fri, 5 Feb 2021 16:36:30 +0000 (16:36 +0000)]
linux: Set default kernel_stat.h to LFS
The XSTAT_IS_XSTAT64 and STAT_IS_KERNEL_STAT flags are now set to 1 and
STATFS_IS_STATFS64 is set to __STATFS_MATCHES_STATFS64. This makes the
default ABI for newer ports to provide only LFS calls.
A copy of non-LFS support is provided to 32-bit ABIS with non-LFS
support (arm, csky, i386, m68k, nios2, s390, and sh). Is also allows
to remove the 64-bit ports, which already uses the default values.
This patch does not change the code generation.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Adhemerval Zanella [Fri, 5 Feb 2021 14:55:45 +0000 (14:55 +0000)]
linux: Fix STATFS_IS_STATFS64 definition
aarch64, arc, ia64, mips64, powerpc64, riscv32, riscv64, s390x, sparc64,
and x86_64 defines STATFS_IS_STATFS64 to 0, but all of them alias
statfs to statfs64 and the struct statfs has the same and layout of
struct statfs64.
The correct definition will be used on the [f]statfs[64] consolidation.
This patch does not change code generation since the symbols are
implemented using the auto-generation syscall for all the aforementioned
ABIs.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Siddhesh Poyarekar [Fri, 5 Feb 2021 08:39:24 +0000 (14:09 +0530)]
tunables: Disallow negative values for some tunables
The glibc.malloc.mmap_max tunable as well as al of the INT_32 tunables
don't have use for negative values, so pin the hardcoded limits in the
non-negative range of INT. There's no real benefit in any of those
use cases for the extended range of unsigned, so I have avoided added
a new type to keep things simple.
Siddhesh Poyarekar [Wed, 3 Feb 2021 14:33:19 +0000 (20:03 +0530)]
x86: Use SIZE_MAX instead of (long int)-1 for tunable range value
The tunable types are SIZE_T, so set the ranges to the correct maximum
value, i.e. SIZE_MAX.
Siddhesh Poyarekar [Fri, 5 Feb 2021 07:48:58 +0000 (13:18 +0530)]
tunables: Simplify TUNABLE_SET interface
The TUNABLE_SET interface took a primitive C type argument, which
resulted in inconsistent type conversions internally due to incorrect
dereferencing of types, especialy on 32-bit architectures. This
change simplifies the TUNABLE setting logic along with the interfaces.
Now all numeric tunable values are stored as signed numbers in
tunable_num_t, which is intmax_t. All calls to set tunables cast the
input value to its primitive type and then to tunable_num_t for
storage. This relies on gcc-specific (although I suspect other
compilers woul also do the same) unsigned to signed integer conversion
semantics, i.e. the bit pattern is conserved. The reverse conversion
is guaranteed by the standard.
Xiaoming Ni [Mon, 4 Jan 2021 04:07:38 +0000 (12:07 +0800)]
setrlimit/getrlimit: Use __nonnull to avoid null pointer
Add __nonnull((2)) to the setrlimit()/getrlimit() function declaration
to avoid null pointer access.
-----
v2
According to the suggestions of the Adhemerval Zanella and Zack Weinberg:
use __nonnull() to check null pointers in the compilation phase.
do not add pointer check code to setrlimit()/getrlimit().
The validity of the "resource" parameter is checked in the syscall.
v1
https://public-inbox.org/libc-alpha/
20201230114131.47589-1-nixiaoming@huawei.com/
-----
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Naohiro Tamura [Mon, 8 Feb 2021 07:59:53 +0000 (07:59 +0000)]
benchtests: Updated json bench-variant attribute
This patch updates json "bench-variant" attribute of "bench-memset.c"
to "default" so that the script "benchtests/scripts/plot_strings.py"
can generate a file "memset_time_default_linear.png".
Without this patch, the script "benchtests/scripts/plot_strings.py"
generates a file "memset_time__linear.png" which has inconsistent form
with "memcpy_time_default_linear.png" and
"memmove_time_default_linear.png".
Adhemerval Zanella [Mon, 16 Jul 2018 20:39:23 +0000 (17:39 -0300)]
regex: stop using alloca
It syncs with gnulib version
87ed1f9c4. No functional changes is
expected.
Checked on x86_64-linux-gnu.
Adhemerval Zanella [Mon, 11 Jan 2021 15:23:00 +0000 (12:23 -0300)]
regexec: remove alloca usage in build_trtable
It syncs with gnulib version
1731fef3d. On build_trtable prevent
inlining, so that it doesn't bloat the caller's stack and use auto
variables instead of alloca/malloc.
After these changes, build_trtable's total stack allocation is
only 20 KiB on a 64-bit machine, and this is less than glibc's 64
KiB cutoff so there's little point to using alloca to shrink it.
Checked on x86_64-linux-gnu.
Adhemerval Zanella [Mon, 16 Jul 2018 20:31:29 +0000 (17:31 -0300)]
regex: remove alloca usage on regex set_regs
It syncs with gnulib version
b6207ab38. It replaces the regmatch_t
with a dynarray list.
Checked on x86_64-linux-gnu.
Adhemerval Zanella [Mon, 11 Jan 2021 15:03:38 +0000 (12:03 -0300)]
malloc: Sync dynarray with gnulib
It syncs with gnulib version
a8bac4d49. The main changes are:
- Remove the usage of anonymous union within DYNARRAY_STRUCT.
- Use DYNARRAY_FREE instead of DYNARRAY_NAME (free) so that
Gnulib does not change 'free' to 'rpl_free'.
- Use __nonnull instead of __attribute__ ((nonnull ())).
- Use __attribute_maybe_unused__ instead of
__attribute__ ((unused, nonnull (1))).
- Use of _Noreturn instead of _attribute__ ((noreturn)).
The only difference with gnulib is:
--- glibc
+++ gnulib
@@ -18,6 +18,7 @@
#include <dynarray.h>
#include <stdio.h>
+#include <stdlib.h>
void
__libc_dynarray_at_failure (size_t size, size_t index)
@@ -27,7 +28,6 @@
__snprintf (buf, sizeof (buf), "Fatal glibc error: "
"array index %zu not less than array length %zu\n",
index, size);
- __libc_fatal (buf);
#else
abort ();
#endif
It seems a wrong sync from gnulib (the code is used on loader and
thus it requires __libc_fatal instead of abort).
Checked on x86_64-linux-gnu.
Adhemerval Zanella [Mon, 11 Jan 2021 14:53:32 +0000 (11:53 -0300)]
misc: Sync cdefs.h with gnulib
It adds __glibc_has_builtin, __glibc_has_extension, and
__attribute_maybe_unused__ alongsize with some fixes.
The differences are:
--- glibc
+++ gnulib
@@ -259,7 +259,9 @@
# define __attribute_const__ /* Ignore */
#endif
-#if __GNUC_PREREQ (2,7) || __glibc_has_attribute (__unused__)
+#if defined __STDC_VERSION__ && 201710L < __STDC_VERSION__
+# define __attribute_maybe_unused__ [[__maybe_unused__]]
+#elif __GNUC_PREREQ (2,7) || __glibc_has_attribute (__unused__)
# define __attribute_maybe_unused__ __attribute__ ((__unused__))
#else
# define __attribute_maybe_unused__ /* Ignore */
@@ -485,7 +487,7 @@
/* The #ifndef lets Gnulib avoid including these on non-glibc
platforms, where the includes typically do not exist. */
-#ifdef __GLIBC__
+#ifndef __WORDSIZE
# include <bits/wordsize.h>
# include <bits/long-double.h>
#endif
The [[__attribute_maybe_unused__]] attribute removal __ is due Joseph
questioning gcc support with -std=c2x or -std=gnu2x [1].
The _WORDSIZE replacement by __GLIBC__ is because it does not play
well with internal cdefs.h that also uses
__LDOUBLE_REDIRECTS_TO_FLOAT128_ABI.
Checked on x86_64-linux-gnu.
[1] https://sourceware.org/pipermail/libc-alpha/2021-January/121600.html
Adhemerval Zanella [Tue, 9 Feb 2021 19:09:51 +0000 (16:09 -0300)]
linux: Fix __sem_check_add_mapping search_sem
Similar to __sem_check_add_mapping fix, take in consideration the
trailling NULL.
Checked x86_64-linux-gnu.
Adhemerval Zanella [Tue, 9 Feb 2021 17:40:06 +0000 (14:40 -0300)]
linux: Fix __sem_check_add_mapping name length
Take in consideration the trailling NULL since sem_search uses
strcmp to compare entries.
Checked on x86_64-linux-gnu and powerpc-linux-gnu (where it triggered
a nptl/tst-sem7 regression).
Joseph Myers [Mon, 8 Feb 2021 22:47:04 +0000 (22:47 +0000)]
Add more ptrace constants for AArch64 and PowerPC.
Linux 5.10 adds PTRACE_PEEKMTETAGS and PTRACE_POKEMTETAGS for AArch64.
Adding those shows up that glibc is also missing PTRACE_SYSEMU and
PTRACE_SYSEMU_SINGLESTEP, for AArch64 (where they were added to Linux
in 5.3) and for PowerPC (where they were added in Linux 4.20); it
already has those two defines for x86. Add all those defines to
glibc's headers.
Tested with build-many-glibcs.py for aarch64-linux-gnu and
powerpc-linux-gnu.
noah [Wed, 3 Feb 2021 05:39:00 +0000 (00:39 -0500)]
strchr: Add additional benchmarks and tests
This patch adds additional benchmarks and tests for string size of
4096 and several benchmarks for string size 256 with different
alignments.
noah [Wed, 3 Feb 2021 05:38:59 +0000 (00:38 -0500)]
x86-64: Refactor and improve performance of strchr-avx2.S
No bug. Just seemed the performance could be improved a bit. Observed
and expected behavior are unchanged. Optimized body of main
loop. Updated page cross logic and optimized accordingly. Made a few
minor instruction selection modifications. No regressions in test
suite. Both test-strchrnul and test-strchr passed.
Adhemerval Zanella [Wed, 3 Feb 2021 17:19:27 +0000 (14:19 -0300)]
pthread: Remove alloca usage from __sem_check_add_mapping
sem_open already returns EINVAL for input names larger than NAME_MAX,
so it can assume the largest name length with tfind.
Checked on x86_64-linux-gnu.
Adhemerval Zanella [Wed, 3 Feb 2021 16:50:21 +0000 (13:50 -0300)]
pthread: Refactor semaphore code
The internal semaphore list code is moved to a specific file,
sem_routine.c, and the internal usage is simplified to only two
functions (one to insert a new semaphore and one to remove it
from the internal list). There is no need to expose the
internal locking, neither how the semaphore mapping is implemented.
No functional or semantic change is expected, tested on
x86_64-linux-gnu.
Florian Weimer [Wed, 3 Feb 2021 11:55:13 +0000 (08:55 -0300)]
linux: Require /dev/shm as the shared memory file system
Previously, glibc would pick an arbitrary tmpfs file system from
/proc/mounts if /dev/shm was not available. This could lead to
an unsuitable file system being picked for the backing storage for
shm_open, sem_open, and related functions.
This patch introduces a new function, __shm_get_name, which builds
the file name under the appropriate (now hard-coded) directory. It is
called from the various shm_* and sem_* function. Unlike the
SHM_GET_NAME macro it replaces, the callers handle the return values
and errno updates. shm-directory.c is moved directly into the posix
subdirectory because it can be implemented directly using POSIX
functionality. It resides in libc because it is needed by both
librt and nptl/htl.
In the sem_open implementation, tmpfname is initialized directly
from a string constant. This happens to remove one alloca call.
Checked on x86_64-linux-gnu.
Paul Zimmermann [Wed, 3 Feb 2021 05:45:16 +0000 (06:45 +0100)]
sunrpc: Fix typo in xdr_string comment
Lukasz Majewski [Wed, 13 Jan 2021 16:10:21 +0000 (17:10 +0100)]
tst: Provide test for ppoll
This change adds new test to assess ppoll()'s timeout related
functionality (the struct pollfd does not provide valid fd to wait
for - just wait for timeout).
To be more specific - two use cases are checked:
- if ppoll() times out immediately when passed struct timespec has zero
values of tv_nsec and tv_sec.
- if ppoll() times out after timeout specified in passed argument
Lukasz Majewski [Wed, 13 Jan 2021 12:35:40 +0000 (13:35 +0100)]
tst: Provide test for timerfd related functions
This change adds new test to assess functionality of timerfd_*
functions.
It creates new timer (operates on its file descriptor) and checks
if time before and after sleep is between expected values.
H.J. Lu [Thu, 4 Feb 2021 18:39:34 +0000 (10:39 -0800)]
x86: Add PTWRITE feature detection [BZ #27346]
1. Add CPUID_INDEX_14_ECX_0 for CPUID leaf 0x14 to detect PTWRITE feature
in EBX of CPUID leaf 0x14 with ECX == 0.
2. Add PTWRITE detection to CPU feature tests.
3. Add 2 static CPU feature tests.
Sergei Trofimovich [Fri, 5 Feb 2021 07:32:18 +0000 (07:32 +0000)]
nsswitch: return result when nss database is locked [BZ #27343]
Before the change nss_database_check_reload_and_get() did not populate
the '*result' value when it returned success in a case of chroot
detection. This caused initgroups() to use garage pointer in the
following test (extracted from unbound):
```
int main() {
// load some NSS modules
struct passwd * pw = getpwnam("root");
chdir("/tmp");
chroot("/tmp");
chdir("/");
// access nsswitch.conf in a chroot
initgroups("root", 0);
}
```
Reviewed-by: DJ Delorie <dj@redhat.com>
Siddhesh Poyarekar [Fri, 5 Feb 2021 04:22:52 +0000 (09:52 +0530)]
printf: Add smoke tests for long double
The printf tests have no coverage for long double. Duplicate the
double tests so that we have some basic coverage.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Joseph Myers [Fri, 5 Feb 2021 01:47:57 +0000 (01:47 +0000)]
Add NT_ARM_TAGGED_ADDR_CTRL from Linux 5.10 to elf.h.
This patch adds the new NT_ARM_TAGGED_ADDR_CTRL constant from Linux
5.10 to glibc's elf.h.
Tested for x86_64.
Bruno Haible [Thu, 7 Jan 2021 01:06:20 +0000 (02:06 +0100)]
argp: Avoid undefined behaviour when invoking qsort().
This fixes a Gnulib test-argp-2.sh test failure on macOS and FreeBSD.
Reported by Jeffrey Walton <noloader@gmail.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-03/msg00085.html>.
* argp/argp-help.c (group_cmp): Remove third argument.
(hol_sibling_cluster_cmp, hol_cousin_cluster_cmp): New functions, based
upon hol_cluster_cmp.
(hol_cluster_cmp): Use hol_cousin_cluster_cmp.
(hol_entry_cmp): Rewritten to implement a total order.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Bruno Haible [Thu, 7 Jan 2021 01:06:19 +0000 (02:06 +0100)]
argp: Improve comments.
* argp/argp-help.c: Add sectioning comments. Write NULL to designate a
null pointer.
(struct hol_entry): Fix comment regarding sort order of group.
(hol_entry_short_iterate, hol_entry_long_iterate): Add comment.
(until_short, canon_doc_option, hol_entry_qcmp): Improve comment.
(hol_cluster_is_child, argp_hol): Move functions.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Bruno Haible [Thu, 7 Jan 2021 01:06:18 +0000 (02:06 +0100)]
argp: Don't pass invalid arguments to isspace, isalnum, isalpha, isdigit.
* lib/argp-help.c (SKIPWS): Cast character to 'unsigned char' before passing it
to isspace().
(fill_in_uparams): Likewise for isalpha(), isalnum(), isdigit().
(canon_doc_option): Likewise for isspace(), isalnum().
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Bruno Haible [Thu, 7 Jan 2021 01:06:17 +0000 (02:06 +0100)]
argp: Don't rely on undefined behaviour of _tolower().
Patch by Eric Blake
<https://lists.gnu.org/archive/html/bug-gnulib/2009-09/msg00287.html>.
* argp/argp-help.c (hol_entry_cmp): Don't use _tolower on values that are
not upper-case. Pass correct range to tolower.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Paul Eggert [Thu, 7 Jan 2021 01:06:16 +0000 (02:06 +0100)]
argp: fix pointer-subtraction bug
* argp/argp-help.c (hol_append): Don't subtract pointers to
different arrays, as this can run afoul of -fcheck-pointer-bounds.
See the thread containing Bruno Haible's report in:
http://lists.gnu.org/archive/html/bug-gnulib/2017-05/msg00171.html
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Joseph Myers [Thu, 4 Feb 2021 16:00:36 +0000 (16:00 +0000)]
Use binutils 2.36 branch in build-many-glibcs.py.
This patch makes build-many-glibcs.py use binutils 2.36 branch.
Tested with build-many-glibcs.py (compilers and glibcs builds).
Florian Weimer [Thu, 4 Feb 2021 14:02:38 +0000 (15:02 +0100)]
manual: Correct description of ENTRY [BZ #17183]
The struct tag is actually entry (not ENTRY). The data member has
type void *, and it can point to binary data. Only the key member is
required to be a null-terminated string.
Reviewed-by: Arjun Shankar <arjun@redhat.com>
Florian Weimer [Thu, 4 Feb 2021 14:00:20 +0000 (15:00 +0100)]
nptl: Remove private futex optimization [BZ #27304]
It is effectively used, unexcept for pthread_cond_destroy, where we do
not want it; see bug 27304. The internal locks do not support a
process-shared mode.
This fixes commit
dc6cfdc934db9997c33728082d63552b9eee4563 ("nptl:
Move pthread_cond_destroy implementation into libc").
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Mike Hommey [Wed, 27 Jan 2021 04:45:05 +0000 (13:45 +0900)]
stdio-common: Add a few double formatting tests [BZ #27245]
Checked on x86_64-linux-gnu.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Stafford Horne [Wed, 3 Feb 2021 18:36:47 +0000 (15:36 -0300)]
posix/tst-rfc3484: Fix compile failure linking to local __stat64
After
04986243d1 ("Remove internal usage of extensible stat functions")
linking the __stat64 symbol in getaddrinfo for this test fails with the
below error:
[...] or1k-smh-linux-gnu/bin/ld: [...]/posix/tst-rfc3484.o: in function `gaiconf_reload':
[...]/sysdeps/posix/getaddrinfo.c:2136: undefined reference to `__stat64'
collect2: error: ld returned 1 exit status
This is because __stat64 is a local symbol, the test includes the
getaddrinfo directly and fails to link against the local symbol. Fix
this by setting up an alias to the global stat64 symbol name like is
done for other local symbol usage.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Siddhesh Poyarekar [Wed, 3 Feb 2021 17:41:43 +0000 (23:11 +0530)]
i686: Regenerate ULPs
H.J. Lu [Tue, 2 Feb 2021 17:31:56 +0000 (09:31 -0800)]
tst-rtld-list-tunables.sh: Unset glibc tunables
Unset glibc tunables and their aliases for --list-tunables test.
Adhemerval Zanella [Tue, 2 Feb 2021 12:55:50 +0000 (09:55 -0300)]
linux: Remove shmmax check from tst-sysvshm-linux
The shmmax expected value is tricky to check because kernel clamps it
to INT_MAX in two cases:
1. Compat symbols with IPC_64, i.e, 32-bit binaries running on 64-bit
kernels.
2. Default symbol without IPC_64 (defined as IPC_OLD within Linux) and
glibc always use IPC_64 for 32-bit ABIs (to support 64-bit time_t).
It means that 32-bit binaries running on 32-bit kernels will not see
shmmax being clamped.
And finding out whether the compat symbol is used would require checking
the underlying kernel against the current ABI. The shmall and shmmni
already provided enough coverage.
Checked on x86_64-linux-gnu and i686-linux-gnu. It should fix the
tst-sysvshm-linux failures on 32-bit kernels.
Sajan Karumanchi [Tue, 2 Feb 2021 11:42:14 +0000 (12:42 +0100)]
x86: Adding an upper bound for Enhanced REP MOVSB.
In the process of optimizing memcpy for AMD machines, we have found the
vector move operations are outperforming enhanced REP MOVSB for data
transfers above the L2 cache size on Zen3 architectures.
To handle this use case, we are adding an upper bound parameter on
enhanced REP MOVSB:'__x86_rep_movsb_stop_threshold'.
As per large-bench results, we are configuring this parameter to the
L2 cache size for AMD machines and applicable from Zen3 architecture
supporting the ERMS feature.
For architectures other than AMD, it is the computed value of
non-temporal threshold parameter.
Reviewed-by: Premachandra Mallappa <premachandra.mallappa@amd.com>
Adhemerval Zanella [Tue, 2 Feb 2021 11:22:25 +0000 (08:22 -0300)]
Fix version.h for glibc 2.34 development
Joseph Myers [Tue, 2 Feb 2021 01:17:00 +0000 (01:17 +0000)]
Add MS_NOSYMFOLLOW from Linux 5.10 to <sys/mount.h>.
This patch adds the new constant MS_NOSYMFOLLOW from Linux 5.10 to
<sys/mount.h>.
Tested for x86_64.
H.J. Lu [Mon, 1 Feb 2021 23:50:51 +0000 (15:50 -0800)]
Move _SC_MINSIGSTKSZ/_SC_SIGSTKSZ entry in NEWS
Move _SC_MINSIGSTKSZ/_SC_SIGSTKSZ entry to 2.34 section.
Vitaly Chikunov [Mon, 1 Feb 2021 20:04:08 +0000 (23:04 +0300)]
libSegFault: Fix printing signal number [BZ #27249]
Signal number is written into the tail of buf, but printed from the
beginning, outputting garbage on the screen. Fix this by printing
from the correct position.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Reviewed-by: Dmitry V. Levin <ldv@altlinux.org>
Samuel Thibault [Mon, 1 Feb 2021 19:00:18 +0000 (20:00 +0100)]
hurd TIOCFLUSH: fix fixing argument
The argument actually used inside send_rpc is argptr, not arg.
H.J. Lu [Mon, 1 Feb 2021 19:00:38 +0000 (11:00 -0800)]
sysconf: Add _SC_MINSIGSTKSZ/_SC_SIGSTKSZ [BZ #20305]
Add _SC_MINSIGSTKSZ for the minimum signal stack size derived from
AT_MINSIGSTKSZ, which is the minimum number of bytes of free stack
space required in order to gurantee successful, non-nested handling
of a single signal whose handler is an empty function, and _SC_SIGSTKSZ
which is the suggested minimum number of bytes of stack space required
for a signal stack.
If AT_MINSIGSTKSZ isn't available, sysconf (_SC_MINSIGSTKSZ) returns
MINSIGSTKSZ. On Linux/x86 with XSAVE, the signal frame used by kernel
is composed of the following areas and laid out as:
------------------------------
| alignment padding |
------------------------------
| xsave buffer |
------------------------------
| fsave header (32-bit only) |
------------------------------
| siginfo + ucontext |
------------------------------
Compute AT_MINSIGSTKSZ value as size of xsave buffer + size of fsave
header (32-bit only) + size of siginfo and ucontext + alignment padding.
If _SC_SIGSTKSZ_SOURCE or _GNU_SOURCE are defined, MINSIGSTKSZ and SIGSTKSZ
are redefined as
/* Default stack size for a signal handler: sysconf (SC_SIGSTKSZ). */
# undef SIGSTKSZ
# define SIGSTKSZ sysconf (_SC_SIGSTKSZ)
/* Minimum stack size for a signal handler: SIGSTKSZ. */
# undef MINSIGSTKSZ
# define MINSIGSTKSZ SIGSTKSZ
Compilation will fail if the source assumes constant MINSIGSTKSZ or
SIGSTKSZ.
The reason for not simply increasing the kernel's MINSIGSTKSZ #define
(apart from the fact that it is rarely used, due to glibc's shadowing
definitions) was that userspace binaries will have baked in the old
value of the constant and may be making assumptions about it.
For example, the type (char [MINSIGSTKSZ]) changes if this #define
changes. This could be a problem if an newly built library tries to
memcpy() or dump such an object defined by and old binary.
Bounds-checking and the stack sizes passed to things like sigaltstack()
and makecontext() could similarly go wrong.
Samuel Thibault [Mon, 1 Feb 2021 18:39:48 +0000 (19:39 +0100)]
hurd TIOCFLUSH: Cope BSD 4.1 semantic
BSD 4.1 did not have an argument for TIOCFLUSH, BSD 4.2 added it. There
are still a lot of applications out there that pass a NULL argument to
TIOCFLUSH, so we should rather cope with it.
Yang Xu [Mon, 1 Feb 2021 18:19:43 +0000 (19:19 +0100)]
tst-mallinfo2.c: Remove useless trailing semicolon for macro
Macros should not use a trailing semicolon, so remove it.
Reviewed-by: DJ Delorie <dj@redhat.com>
Fangrui Song [Mon, 1 Feb 2021 17:29:26 +0000 (09:29 -0800)]
elf: Replace a --defsym trick with an object file to be compatible with LLD
The existing code specifies -Wl,--defsym=malloc=0 and other malloc.os
definitions before libc_pic.a so that libc_pic.a(malloc.os) is not
fetched. This trick is used to avoid multiple definition errors which
would happen as a chain result:
dl-allobjs.os has an undefined __libc_scratch_buffer_set_array_size
__libc_scratch_buffer_set_array_size fetches libc_pic.a(scratch_buffer_set_array_size.os)
libc_pic.a(scratch_buffer_set_array_size.os) has an undefined free
free fetches libc_pic.a(malloc.os)
libc_pic.a(malloc.os) has an undefined __libc_message
__libc_message fetches libc_pic.a(libc_fatal.os)
libc_fatal.os will cause a multiple definition error (__GI___libc_fatal)
>>> defined at dl-fxstatat64.c
>>> /tmp/p/glibc/Release/elf/dl-allobjs.os:(__GI___libc_fatal)
>>> defined at libc_fatal.c
>>> libc_fatal.os:(.text+0x240) in archive /tmp/p/glibc/Release/libc_pic.a
LLD processes --defsym after all input files, so this trick does not
suppress multiple definition errors with LLD. Split the step into two
and use an object file to make the intention more obvious and make LLD
work.
This is conceptually more appropriate because --defsym defines a SHN_ABS
symbol while a normal definition is relative to the image base.
See https://sourceware.org/pipermail/libc-alpha/2020-March/111910.html
for discussions about the --defsym semantics.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
Adhemerval Zanella [Mon, 1 Feb 2021 17:04:23 +0000 (14:04 -0300)]
Open master branch for glibc 2.34 development
Adhemerval Zanella [Mon, 1 Feb 2021 16:46:41 +0000 (13:46 -0300)]
Prepare for glibc 2.33 release
Update version.h, features.h, and ChangeLog.old/ChangeLog.22.
Adhemerval Zanella [Mon, 1 Feb 2021 16:44:05 +0000 (13:44 -0300)]
Update NEWS with bugs
Adhemerval Zanella [Mon, 1 Feb 2021 17:09:36 +0000 (14:09 -0300)]
Update translations
Add missing Serbian translation.
Florian Weimer [Fri, 29 Jan 2021 17:20:54 +0000 (18:20 +0100)]
NEWS: Fix typo in CVE-2021-3326 entry
Adhemerval Zanella [Fri, 29 Jan 2021 13:30:19 +0000 (10:30 -0300)]
elf: Fix tests that rely on ld.so.cache for cross-compiling
For configurations with cross-compiling equal to 'maybe' or 'no',
ldconfig will not run and thus the ld.so.cache will not be created
on the container testroot.pristine.
This lead to failures on both tst-glibc-hwcaps-prepend-cache and
tst-ldconfig-ld_so_conf-update on environments where the same
compiler can be used to build different ABIs (powerpc and x86 for
instance).
This patch addas a new test-container hook, ldconfig.run, that
triggers a ldconfig execution prior the test execution.
Checked on x86_64-linux-gnu and i686-linux-gnu.
Florian Weimer [Fri, 29 Jan 2021 16:29:57 +0000 (17:29 +0100)]
NEWS: Mention CVE-2021-3326 (iconv assertion with ISO-20220-JP-3)
Florian Weimer [Fri, 29 Jan 2021 16:26:18 +0000 (17:26 +0100)]
NEWS: Add entry for glibc-hwcaps and deprecate legacy hwcaps
H.J. Lu [Wed, 27 Jan 2021 04:48:45 +0000 (20:48 -0800)]
x86: Properly set usable CET feature bits [BZ #26625]
commit
94cd37ebb293321115a36a422b091fdb72d2fb08
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Sep 16 05:27:32 2020 -0700
x86: Use HAS_CPU_FEATURE with IBT and SHSTK [BZ #26625]
broke
GLIBC_TUNABLES=glibc.cpu.hwcaps=-IBT,-SHSTK
since it can no longer disable IBT nor SHSTK. Handle IBT and SHSTK with:
1. Revert commit
94cd37ebb293321115a36a422b091fdb72d2fb08.
2. Clears the usable CET feature bits if kernel doesn't support CET.
3. Add GLIBC_TUNABLES tests without dlopen.
4. Add tests to verify that CPU_FEATURE_USABLE on IBT and SHSTK matches
_get_ssp.
5. Update GLIBC_TUNABLES tests with dlopen to verify that CET is disabled
with GLIBC_TUNABLES.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Adhemerval Zanella [Thu, 28 Jan 2021 16:45:09 +0000 (13:45 -0300)]
Update translations
Adhemerval Zanella [Wed, 27 Jan 2021 20:09:23 +0000 (17:09 -0300)]
Update libc.pot for 2.33 release
Adhemerval Zanella [Thu, 28 Jan 2021 13:32:53 +0000 (10:32 -0300)]
Update ia64 libm-test-ulps
Adhemerval Zanella [Thu, 28 Jan 2021 14:37:17 +0000 (11:37 -0300)]
sh: Update libm-tests-ulps
Adhemerval Zanella [Thu, 28 Jan 2021 13:27:30 +0000 (10:27 -0300)]
ia64: Fix brk call on statup
brk used by statup before TCB is properly set, so we can't use
IA64_USE_NEW_STUB.
This patch fixes a regression introduced by
720480934ab910.
Checked on ia64-linux-gnu.
Adhemerval Zanella [Thu, 28 Jan 2021 11:44:11 +0000 (08:44 -0300)]
Update sparc libm-test-ulps
Adhemerval Zanella [Wed, 27 Jan 2021 20:23:28 +0000 (17:23 -0300)]
Update alpha libm-test-ulps
Raoni Fassina Firmino [Wed, 27 Jan 2021 19:23:05 +0000 (16:23 -0300)]
powerpc64: Workaround sigtramp vdso return call
A not so recent kernel change[1] changed how the trampoline
`__kernel_sigtramp_rt64` is used to call signal handlers.
This was exposed on the test misc/tst-sigcontext-get_pc
Before kernel 5.9, the kernel set LR to the trampoline address and
jumped directly to the signal handler, and at the end the signal
handler, as any other function, would `blr` to the address set. In
other words, the trampoline was executed just at the end of the signal
handler and the only thing it did was call sigreturn. But since
kernel 5.9 the kernel set CTRL to the signal handler and calls to the
trampoline code, the trampoline then `bctrl` to the address in CTRL,
setting the LR to the next instruction in the middle of the
trampoline, when the signal handler returns, the rest of the
trampoline code executes the same code as before.
Here is the full trampoline code as of kernel 5.11.0-rc5 for
reference:
V_FUNCTION_BEGIN(__kernel_sigtramp_rt64)
.Lsigrt_start:
bctrl /* call the handler */
addi r1, r1, __SIGNAL_FRAMESIZE
li r0,__NR_rt_sigreturn
sc
.Lsigrt_end:
V_FUNCTION_END(__kernel_sigtramp_rt64)
This new behavior breaks how `backtrace()` uses to detect the
trampoline frame to correctly reconstruct the stack frame when it is
called from inside a signal handling.
This workaround rely on the fact that the trampoline code is at very
least two (maybe 3?) instructions in size (as it is in the 32 bits
version, only on `li` and `sc`), so it is safe to check the return
address be in the range __kernel_sigtramp_rt64 .. + 4.
[1] subject: powerpc/64/signal: Balance return predictor stack in signal trampoline
commit:
0138ba5783ae0dcc799ad401a1e8ac8333790df9
url: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=
0138ba5783ae0dcc799ad401a1e8ac8333790df9
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
DJ Delorie [Thu, 28 Jan 2021 01:05:26 +0000 (20:05 -0500)]
Fix nss/tst-reload2 for systems without PATH_MAX
DJ Delorie [Sat, 16 Jan 2021 00:50:00 +0000 (19:50 -0500)]
nsswitch: do not reload if "/" changes
https://sourceware.org/bugzilla/show_bug.cgi?id=27077
Before reloading nsswitch.conf, verify that the root directory
hasn't changed - if it has, it's likely that we've entered a
container and should not trust the nsswitch inside the container
nor load any shared objects therein.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Matheus Castanho [Tue, 15 Dec 2020 18:35:41 +0000 (15:35 -0300)]
elf: Limit tst-prelink-cmp target archs
elf/tst-prelink-cmp was initially added for x86 (commit
fe534fe898) to validate
the fix for Bug 19178, and later applied to all architectures that use GLOB_DAT
relocations (commit
89569c8bb6). However, that bug only affected targets that
handle GLOB_DAT relocations as ELF_TYPE_CLASS_EXTERN_PROTECTED_DATA, so the test
should only apply to targets defining DL_EXTERN_PROTECTED_DATA, which gates the
usage of the elf type class above. For all other targets not meeting that
criteria, the test now returns with UNSUPPORTED status.
Fixes the test on POWER10 processors, which started using R_PPC64_GLOB_DAT.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Florian Weimer [Wed, 27 Jan 2021 12:36:12 +0000 (13:36 +0100)]
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>
Szabolcs Nagy [Wed, 27 Jan 2021 09:44:19 +0000 (09:44 +0000)]
Revert "Make libc symbols hidden in static PIE" [BZ #27237]
This reverts commit
2682695e5c7acf1e60dd3b5c3a14d4e82416262c.
Fixes bug 27237.
That commit turned out to be too intrusive affecting crt files, test
system and benchmark files. They should not be affected, but the
build system does not set the MODULE_NAME and LIBC_NONSHARED reliably.
Arjun Shankar [Tue, 26 Jan 2021 17:14:19 +0000 (18:14 +0100)]
benchtests: Do not build bench-timing-type with MODULE_NAME=libc
Since commit
2682695e5c7a, `make bench-build' with `--enable-static-pie'
fails due to bench-timing-type being incorrectly built with MODULE_NAME
set to `libc'. This commit sets MODULE_NAME to nonlib, thus fixing the
build failure.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Szabolcs Nagy [Fri, 22 Jan 2021 16:57:32 +0000 (16:57 +0000)]
aarch64: Fix the list of tested IFUNC variants [BZ #26818]
Some IFUNC variants are not compatible with BTI and MTE so don't
set them as usable for testing and benchmarking on a BTI or MTE
enabled system.
As far as IFUNC selectors are concerned a system is BTI enabled if
the cpu supports it and glibc was built with BTI branch protection.
Most IFUNC variants are BTI compatible, but thunderx2 memcpy and
memmove use a jump table with indirect jump, without a BTI j.
Fixes bug 26818.
Tulio Magno Quites Machado Filho [Mon, 25 Jan 2021 16:13:17 +0000 (13:13 -0300)]
Update INSTALL with package versions that are known to work
Most packages have been tested with their latest releases, except for
Python, whose latest version is 3.9.1.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Szabolcs Nagy [Fri, 22 Jan 2021 16:14:05 +0000 (16:14 +0000)]
aarch64: Move and update the definition of MTE_ENABLED
The hwcap value is now in linux 5.10 and in glibc bits/hwcap.h, so use
that definition.
Move the definition to init-arch.h so all ifunc selectors can use it
and expose an "mte" shorthand for mte enabled runtime.
For now we allow user code to enable tag checks and use PROT_MTE
mappings without libc involvment, this is not guaranteed ABI, but
can be useful for testing and debugging with MTE.
Andreas Schwab [Mon, 25 Jan 2021 13:29:45 +0000 (14:29 +0100)]
Fix misplaced const
Constify __x86_cacheinfo_p and __x86_cpu_features_p, not their pointer
target types.
Mao Han [Fri, 22 Jan 2021 07:45:34 +0000 (07:45 +0000)]
Update C-SKY libm-test-ulps
John McCabe [Tue, 19 Jan 2021 18:25:25 +0000 (18:25 +0000)]
manual: Correct argument order in mount examples [BZ #27207]
Reviewed-by: DJ Delorie <dj@redhat.com>
Adhemerval Zanella [Mon, 16 Nov 2020 19:52:36 +0000 (16:52 -0300)]
linux: mips: Fix getdents64 fallback on mips64-n32
GCC mainline shows the following error:
../sysdeps/unix/sysv/linux/mips/mips64/getdents64.c: In function '__getdents64':
../sysdeps/unix/sysv/linux/mips/mips64/getdents64.c:121:7: error: 'memcpy' forming offset [4, 7] is out of the bounds [0, 4] [-Werror=array-bounds]
121 | memcpy (((char *) dp + offsetof (struct dirent64, d_ino)),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
122 | KDP_MEMBER (kdp, d_ino), sizeof ((struct dirent64){0}.d_ino));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../sysdeps/unix/sysv/linux/mips/mips64/getdents64.c:123:7: error: 'memcpy' forming offset [4, 7] is out of the bounds [0, 4] [-Werror=array-bounds]
123 | memcpy (((char *) dp + offsetof (struct dirent64, d_off)),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
124 | KDP_MEMBER (kdp, d_off), sizeof ((struct dirent64){0}.d_off));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The issue is due both d_ino and d_off fields for mips64-n32
kernel_dirent are 32-bits, while this is using memcpy to copy 64 bits
from it into the glibc dirent64.
The fix is to use a temporary buffer to read the correct type
from kernel_dirent.
Checked with a build-many-glibcs.py for mips64el-linux-gnu and I
also checked the tst-getdents64 on mips64el 4.1.4 kernel with
and without fallback enabled (by manually setting the
getdents64_supported).
H.J. Lu [Thu, 21 Jan 2021 19:12:30 +0000 (11:12 -0800)]
x86: Properly match CPU features in /proc/cpuinfo [BZ #27222]
Search " YYY " and " YYY\n", instead of "YYY", to avoid matching
"XXXYYYZZZ" with "YYY".
Update /proc/cpuinfo CPU feature names:
/proc/cpuinfo glibc
------------------------------------------------
avx512vbmi AVX512_VBMI
dts DS
pni SSE3
tsc_deadline_timer TSC_DEADLINE
H.J. Lu [Thu, 21 Jan 2021 19:57:27 +0000 (11:57 -0800)]
x86-64: Update tst-glibc-hwcaps-2.c for x86-64 baseline
Return EXIT_FAILURE only if the level 2 libx86-64-isa-level.so is used
on x86-64 baseline machine.