about summary refs log tree commit diff
path: root/sysdeps
Commit message (Collapse)AuthorAgeFilesLines
* Linux: Pass size argument of epoll_create to the kernelFlorian Weimer2022-12-221-1/+1
| | | | | | | | | | | The kernel actually verifies it, and a garbage value in the register causes improper system call failures. Fixes commit c1c0dea38833751f36a145c32 ("Linux: Remove epoll_create, inotify_init from syscalls.list") and commit d1d23b134244d59c4d6ef2295 ("Lninux: consolidate epoll_create implementation"). Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Define MADV_COLLAPSE from Linux 6.1Joseph Myers2022-12-222-0/+3
| | | | | | | Add the MADV_COLLAPSE constant from Linux 6.1 to bits/mman-linux.h and the hppa bits/mman.h. Tested for x86_64.
* powerpc64: Increase SIGSTKSZ and MINSIGSTKSZRajalakshmi Srinivasaraghavan2022-12-211-0/+5
| | | | | | | This patch increases the value of SIGSTKSZ and MINSIGSTKSZ for powerpc64 similar to the kernel commit 2f82ec19757f58549467db568c56e7dfff8af283 to allow further expansion of the signal stack frame size.
* Update kernel version to 6.1 in header constant testsJoseph Myers2022-12-213-4/+4
| | | | | | | | | This patch updates the kernel version in the tests tst-mman-consts.py, tst-mount-consts.py and tst-pidfd-consts.py to 6.1. (There are no new constants covered by these tests in 6.1 that need any other header changes.) Tested with build-many-glibcs.py.
* Update syscall lists for Linux 6.1Joseph Myers2022-12-201-2/+2
| | | | | Linux 6.1 has no new syscalls. Update the version number in syscall-names.list to reflect that it is still current for 6.1.
* stdio-common: Convert vfprintf and related functions to buffersFlorian Weimer2022-12-195-101/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | vfprintf is entangled with vfwprintf (of course), __printf_fp, __printf_fphex, __vstrfmon_l_internal, and the strfrom family of functions. The latter use the internal snprintf functionality, so vsnprintf is converted as well. The simples conversion is __printf_fphex, followed by __vstrfmon_l_internal and __printf_fp, and finally __vfprintf_internal and __vfwprintf_internal. __vsnprintf_internal and strfrom* are mostly consuming the new interfaces, so they are comparatively simple. __printf_fp is a public symbol, so the FILE *-based interface had to preserved. The __printf_fp rewrite does not change the actual binary-to-decimal conversion algorithm, and digits are still not emitted directly to the target buffer. However, the staging buffer now uses bytes instead of wide characters, and one buffer copy is eliminated. The changes are at least performance-neutral in my testing. Floating point printing and snprintf improved measurably, so that this Lua script for i=1,5000000 do print(i, i * math.pi) end runs about 5% faster for me. To preserve fprintf performance for a simple "%d" format, this commit has some logic changes under LABEL (unsigned_number) to avoid additional function calls. There are certainly some very easy performance improvements here: binary, octal and hexadecimal formatting can easily avoid the temporary work buffer (the number of digits can be computed ahead-of-time using one of the __builtin_clz* built-ins). Decimal formatting can use a specialized version of _itoa_word for base 10. The existing (inconsistent) width handling between strfmon and printf is preserved here. __print_fp_buffer_1 would have to use __translated_number_width to achieve ISO conformance for printf. Test expectations in libio/tst-vtables-common.c are adjusted because the internal staging buffer merges all virtual function calls into one. In general, stack buffer usage is greatly reduced, particularly for unbuffered input streams. __printf_fp can still use a large buffer in binary128 mode for %g, though. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Linux: Remove epoll_create, inotify_init from syscalls.listFlorian Weimer2022-12-192-2/+2
| | | | | | | | | | | Their presence causes stub warnings to be created on architectures which do not implement them. Fixes commit d1d23b134244d59c4d6ef2295 ("Lninux: consolidate epoll_create implementation") and commit 842128f160a48e5545900ea3b ("Linux: consolidate inotify_init implementation"). Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Linux: Reflow and sort some Makefile variablesFlorian Weimer2022-12-191-63/+155
| | | | Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* mach: Drop remnants of old_CFLAGSSamuel Thibault2022-12-192-8/+0
|
* mach: Fix passing -ffreestanding when checking for gnumach headersSamuel Thibault2022-12-192-12/+6
| | | | | | 8b8c768e3c70 ("Force use of -ffreestanding when checking for gnumach headers") was passing -ffreestanding to CFLAGS only, but headers checks are performed with the preprocessor, so we rather need to pass it to CPPFLAGS.
* Force use of -ffreestanding when checking for gnumach headersFlavio Cruz2022-12-192-1/+13
| | | | | | | Without this ./configure assumes that we are in a fully hosted environment, which might not be the case. After this patch, we can rely on the freestanding header files provided by GCC such as stdint.h. Message-Id: <Y5+0V9osFc/zXMq0@mars>
* x86: Prevent SIGSEGV in memcmp-sse2 when data is concurrently modified [BZ ↵Noah Goldstein2022-12-151-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | #29863] In the case of INCORRECT usage of `memcmp(a, b, N)` where `a` and `b` are concurrently modified as `memcmp` runs, there can be a SIGSEGV in `L(ret_nonzero_vec_end_0)` because the sequential logic assumes that `(rdx - 32 + rax)` is a positive 32-bit integer. To be clear, this change does not mean the usage of `memcmp` is supported. The program behaviour is undefined (UB) in the presence of data races, and `memcmp` is incorrect when the values of `a` and/or `b` are modified concurrently (data race). This UB may manifest itself as a SIGSEGV. That being said, if we can allow the idiomatic use cases, like those in yottadb with opportunistic concurrency control (OCC), to execute without a SIGSEGV, at no cost to regular use cases, then we can aim to minimize harm to those existing users. The fix replaces a 32-bit `addl %edx, %eax` with the 64-bit variant `addq %rdx, %rax`. The 1-extra byte of code size from using the 64-bit instruction doesn't contribute to overall code size as the next target is aligned and has multiple bytes of `nop` padding before it. As well all the logic between the add and `ret` still fits in the same fetch block, so the cost of this change is basically zero. The relevant sequential logic can be seen in the following pseudo-code: ``` /* * rsi = a * rdi = b * rdx = len - 32 */ /* cmp a[0:15] and b[0:15]. Since length is known to be [17, 32] in this case, this check is also assumed to cover a[0:(31 - len)] and b[0:(31 - len)]. */ movups (%rsi), %xmm0 movups (%rdi), %xmm1 PCMPEQ %xmm0, %xmm1 pmovmskb %xmm1, %eax subl %ecx, %eax jnz L(END_NEQ) /* cmp a[len-16:len-1] and b[len-16:len-1]. */ movups 16(%rsi, %rdx), %xmm0 movups 16(%rdi, %rdx), %xmm1 PCMPEQ %xmm0, %xmm1 pmovmskb %xmm1, %eax subl %ecx, %eax jnz L(END_NEQ2) ret L(END2): /* Position first mismatch. */ bsfl %eax, %eax /* The sequential version is able to assume this value is a positive 32-bit value because the first check included bytes in range a[0:(31 - len)] and b[0:(31 - len)] so `eax` must be greater than `31 - len` so the minimum value of `edx` + `eax` is `(len - 32) + (32 - len) >= 0`. In the concurrent case, however, `a` or `b` could have been changed so a mismatch in `eax` less or equal than `(31 - len)` is possible (the new low bound is `(16 - len)`. This can result in a negative 32-bit signed integer, which when zero extended to 64-bits is a random large value this out out of bounds. */ addl %edx, %eax /* Crash here because 32-bit negative number in `eax` zero extends to out of bounds 64-bit offset. */ movzbl 16(%rdi, %rax), %ecx movzbl 16(%rsi, %rax), %eax ``` This fix is quite simple, just make the `addl %edx, %eax` 64 bit (i.e `addq %rdx, %rax`). This prevents the 32-bit zero extension and since `eax` is still a low bound of `16 - len` the `rdx + rax` is bound by `(len - 32) - (16 - len) >= -16`. Since we have a fixed offset of `16` in the memory access this must be in bounds.
* Allow _Qp_fgt in sparc64 localplt.dataJoseph Myers2022-12-131-0/+1
| | | | | | | | | | A recent GCC change resulted in localplt test failures on sparc64 because of references to _Qp_fgt. This is analogous to all the other floating-point symbols allowed in localplt.data, so it seems appropriate to allow this one as well. Tested with build-many-glibcs.py for sparc64-linux-gnu (GCC mainline), where it fixes the test failure.
* Linux: Consolidate typesizes.hAdhemerval Zanella Netto2022-12-079-0/+646
| | | | | | | | | | | | | | | The generic (sysdeps/unix/sysv/linux/generic/bits/typesizes.h) and default (bits/typesizes.h) differs in two fields: bits/typesizes.h Linux generic __NLINK_T_TYPE __UWORD_TYPE __U32_TYPE __BLKSIZE_T_TYPE __SLONGWORD_TYPE __S32_TYPE Sinceit leads to different C++ mangling names, the default typesize.h is copied for the requires archtiectures and the generic is make the default Linux one. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* Linux: Make generic fcntl.h the default oneAdhemerval Zanella Netto2022-12-072-57/+54
| | | | | | | | It is currently used for csky, arc, nios2, and or1k. Newer 64 bit architecture, like riscv32 and loongarch, reimplement it to override F_GETLK64/F_SETLK64/F_SETLKW64. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* Linux: make generic xstatver.h the default oneAdhemerval Zanella Netto2022-12-074-11/+37
| | | | | | And copy the current default one to required ABIs. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* Linux: Remove generic sysdepAdhemerval Zanella Netto2022-12-0710-33/+21
| | | | | | | The includes chain is added on each architecture sysdep.h and the __NR__llseek hack is moved to lseek.c and lseek64.c. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* Linux: Assume and consolidate shutdown wire-up syscallAdhemerval Zanella Netto2022-12-0710-15/+8
| | | | | | | | And disable if kernel does not support it. Checked on x86_64-linux-gnu and i686-linux-gnu. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* Linux: Assume and consolidate listen wire-up syscallAdhemerval Zanella Netto2022-12-0710-17/+6
| | | | | | | | And disable if kernel does not support it. Checked on x86_64-linux-gnu and i686-linux-gnu. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* Linux: Assume and consolidate socketpair wire-up syscallAdhemerval Zanella Netto2022-12-0710-14/+5
| | | | | | | | And disable if kernel does not support it. Checked on x86_64-linux-gnu and i686-linux-gnu. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* Linux: Assume and consolidate socket wire-up syscallAdhemerval Zanella Netto2022-12-0710-14/+5
| | | | | | | | And disable if kernel does not support it. Checked on x86_64-linux-gnu and i686-linux-gnu. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* Linux: Assume and consolidate bind wire-up syscallAdhemerval Zanella Netto2022-12-0710-14/+9
| | | | | | | | And disable if kernel does not support it. Checked on x86_64-linux-gnu and i686-linux-gnu. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* Linux: consolidate ____longjmp_chkAdhemerval Zanella Netto2022-12-071-3/+3
| | | | | | Checked on x86_64-linux-gnu. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* Linux: consolidate sendfile implementationAdhemerval Zanella Netto2022-12-077-11/+49
| | | | | | | | | | | | | This is similar to other LFS consolidation, where the non-LFS is only built if __OFF_T_MATCHES_OFF64_T is not defined and the LFS version is aliased to non-LFS name if __OFF_T_MATCHES_OFF64_T is defined. For non-LFS variant, use sendfile syscall if defined, otherwise use sendfile64 plus the offset overflow check (as generic implementation). Checked on x86_64-linux-gnu. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* Linux: consolidate unlink implementationAdhemerval Zanella Netto2022-12-071-2/+7
| | | | | | | | Use unlink syscall if defined, otherwise use unlinkat. Checked on x86_64-linux-gnu. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* Linux: consolidate symlink implementationAdhemerval Zanella Netto2022-12-071-2/+7
| | | | | | | | Use symlink syscall if defined, otherwise use symlinkat. Checked on x86_64-linux-gnu. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* Linux: consolidate rmdir implementationAdhemerval Zanella Netto2022-12-071-2/+7
| | | | | | | | Use rmdir syscall if defined, otherwise use unlinkat. Checked on x86_64-linux-gnu. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* Linux: consolidate readlink implementationAdhemerval Zanella Netto2022-12-071-2/+7
| | | | | | | | Use readlink syscall if defined, otherwise readlinkat. Checked on x86_64-linux-gnu. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* Linux: consolidate mkdir implementationAdhemerval Zanella Netto2022-12-071-7/+8
| | | | | | | | Use mkdir syscall if defined, otherwise use mkdirat. Checked on x86_64-linux-gnu. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* Linux: consolidate link implementationAdhemerval Zanella Netto2022-12-071-2/+7
| | | | | | | | Use link syscall if defined, otherwise use linkat. Checked on x86_64-linux-gnu. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* Linux: consolidate lchown implementationAdhemerval Zanella Netto2022-12-071-3/+8
| | | | | | | | Use lchown syscall if defined, otherwise use fchownat. Checked on x86_64-linux-gnu. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* Linux: consolidate inotify_init implementationAdhemerval Zanella Netto2022-12-071-2/+7
| | | | | | Use inotify_init syscall if defined, otherwise use inotify_init1. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* Lninux: consolidate epoll_create implementationAdhemerval Zanella Netto2022-12-071-2/+7
| | | | | | Use epoll_create syscall if defined, otherwise use epoll_create1. Reviewed-by: Florian Weimer <fweimer@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* Linux: consolidate dup2 implementationAdhemerval Zanella Netto2022-12-071-2/+7
| | | | | | | | Use dup2 syscall if defined, otherwise use dup3. Checked on x86_64-linux-gnu. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* Linux: consolidate chown implementationAdhemerval Zanella Netto2022-12-071-2/+7
| | | | | | | | Use chown syscall if defined, otherwise use fchownat. Checked on x86_64-linux-gnu. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* Linux: consolidate chmod implementationAdhemerval Zanella Netto2022-12-071-3/+7
| | | | | | | | Use chmod syscall if defined, otherwise use fchmodat. Checked on x86_64-linux-gnu. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* linux: Consolidate dl-origin.cAdhemerval Zanella Netto2022-12-072-88/+5
| | | | | | | | | Use the generic implementation as the default, since the syscall is supported by all architectures. Also cleanup some headers and remove the INTERNAL_SYSCALL_ERROR_P usage (the INTERNAL_SYSCALL_CALL macro already returns an negative value if an error occurs).
* linux: Use long int for syscall return valueXing Li2022-12-071-1/+1
| | | | | | | | | The linux syscall ABI returns long, so the generic syscall code for linux should use long for the return value. This fixes the truncation of the return value of the syscall function when that does not fit into an int. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* LoongArch: Use medium cmodel build libc_nonshared.a.Chenghua Xu2022-12-073-0/+38
| | | | | This patch is used to fix address out-of-bounds error when building Chrome.
* x86_64: State assembler is being tested on sysdeps/x86/configureAdhemerval Zanella2022-12-062-3/+3
|
* configure: Remove AS checkAdhemerval Zanella2022-12-062-3/+3
| | | | | | The assembler is not issued directly, but rather always through CC wrapper. The binutils version check if done with LD instead. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* configure: Remove check if ld is GNUAdhemerval Zanella2022-12-061-15/+13
| | | | | Assume linker has gnu argument input style. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* hurd: Make getrandom cache the server portSergey Bugaev2022-12-021-15/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, getrandom would, each time it's called, traverse the file system to find /dev/urandom, fetch some random data from it, then throw away that port. This is quite slow, while calls to getrandom are genrally expected to be fast. Additionally, this means that getrandom can not work when /dev/urandom is unavailable, such as inside a chroot that lacks one. User programs expect calls to getrandom to work inside a chroot if they first call getrandom outside of the chroot. In particular, this is known to break the OpenSSH server, and in that case the issue is exacerbated by the API of arc4random, which prevents it from properly reporting errors, forcing glibc to abort on failure. This causes sshd to just die once it tries to generate a random number. Caching the random server port, in a manner similar to how socket server ports are cached, both improves the performance and works around the chroot issue. Tested on i686-gnu with the following program: pthread_barrier_t barrier; void *worker(void*) { pthread_barrier_wait(&barrier); uint32_t sum = 0; for (int i = 0; i < 10000; i++) { sum += arc4random(); } return (void *)(uintptr_t) sum; } int main() { pthread_t threads[THREAD_COUNT]; pthread_barrier_init(&barrier, NULL, THREAD_COUNT); for (int i = 0; i < THREAD_COUNT; i++) { pthread_create(&threads[i], NULL, worker, NULL); } for (int i = 0; i < THREAD_COUNT; i++) { void *retval; pthread_join(threads[i], &retval); printf("Thread %i: %lu\n", i, (unsigned long)(uintptr_t) retval); } In my totally unscientific benchmark, with this patch, this completes in about 7 seconds, whereas previously it took about 50 seconds. This program was also used to test that getrandom () doesn't explode if the random server dies, but instead reopens the /dev/urandom anew. I have also verified that with this patch, OpenSSH can once again accept connections properly. Signed-off-by: Sergey Bugaev <bugaevc@gmail.com> Message-Id: <20221202135558.23781-1-bugaevc@gmail.com>
* powerpc64: Remove old strncmp optimizationRajalakshmi Srinivasaraghavan2022-12-025-256/+2
| | | | | | | | | | This patch cleans up the power4 strncmp optimization for powerpc64 which is unlikely to be used anywhere. Tested on ppc64le with and without --disable-multi-arch flag. Reviewed-by: Paul E. Murphy <murphyp@linux.ibm.com> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* x86-64 strncpy: Properly handle the length parameter [BZ# 29839]H.J. Lu2022-12-022-0/+8
| | | | | | | | | | | | On x32, the size_t parameter may be passed in the lower 32 bits of a 64-bit register with the non-zero upper 32 bits. The string/memory functions written in assembly can only use the lower 32 bits of a 64-bit register as length or must clear the upper 32 bits before using the full 64-bit register for length. This pach fixes strncpy for x32. Tested on x86-64 and x32. On x86-64, libc.so is the same with and without the fix. Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
* x86-64 strncat: Properly handle the length parameter [BZ# 24097]H.J. Lu2022-12-025-1/+73
| | | | | | | | | | | | On x32, the size_t parameter may be passed in the lower 32 bits of a 64-bit register with the non-zero upper 32 bits. The string/memory functions written in assembly can only use the lower 32 bits of a 64-bit register as length or must clear the upper 32 bits before using the full 64-bit register for length. This pach fixes strncat for x32. Tested on x86-64 and x32. On x86-64, libc.so is the same with and without the fix. Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
* ARC: update definitions in elf/elf.hShahab Vahedi2022-11-291-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While porting ARCv2 to elfutils [1], it was brought up that the necessary changes to the project's libelf/elf.h must come from glibc, because they sync it from glibc [2]. Therefore, this patch is to update ARC entries in elf/elf.h. The majority of the update is about adding new definitions, specially for the relocations. However, there is one rename, one deletion, and one change: - R_ARC_JUMP_SLOT renamed to R_ARC_JMP_SLOT to match binutils. - R_ARC_B26 removed because it is unused and deprecated. - R_ARC_TLS_DTPOFF_S9 changed from 0x4a to the correct value 0x49. Finally, a specific SHT class for ARC has been added to glibcelf.py. Else, it would result in a collision: _register_elf_h(Sht, ranges=True, File "/src/glibc/scripts/glibcelf.py", line x, in _register_elf_h raise ValueError('duplicate value {}: {}, {}'.format( ValueError: duplicate value 1879048193: SHT_ARC_ATTRIBUTES, SHT_X86_64_UNWIND [1] https://sourceware.org/pipermail/elfutils-devel/2022q4/005530.html [2] https://sourceware.org/pipermail/elfutils-devel/2022q4/005548.html No regression has been observed after applying this patch. Below follows the result: UNSUPPORTED: crypt/cert UNSUPPORTED: elf/tst-audit22 FAIL: elf/tst-audit25a FAIL: elf/tst-audit25b FAIL: elf/tst-bz15311 FAIL: elf/tst-bz28937 FAIL: elf/tst-dlmopen4 UNSUPPORTED: elf/tst-dlopen-self-container UNSUPPORTED: elf/tst-dlopen-tlsmodid-container UNSUPPORTED: elf/tst-glibc-hwcaps-prepend-cache UNSUPPORTED: elf/tst-ldconfig-bad-aux-cache UNSUPPORTED: elf/tst-ldconfig-ld_so_conf-update UNSUPPORTED: elf/tst-pldd UNSUPPORTED: elf/tst-preload-pthread-libc XPASS: elf/tst-protected1a XPASS: elf/tst-protected1b FAIL: elf/tst-tls-allocation-failure-static-patched FAIL: elf/tst-tls1 FAIL: elf/tst-tls3 FAIL: elf/tst-tlsalign-extern UNSUPPORTED: elf/tst-valgrind-smoke UNSUPPORTED: grp/tst-initgroups1 UNSUPPORTED: grp/tst-initgroups2 UNSUPPORTED: io/tst-getcwd-smallbuff UNSUPPORTED: locale/tst-localedef-path-norm FAIL: localedata/sort-test UNSUPPORTED: localedata/tst-localedef-hardlinks FAIL: malloc/tst-malloc-thread-fail-malloc-check FAIL: malloc/tst-malloc_info-malloc-check UNSUPPORTED: math/test-fesetexcept-traps UNSUPPORTED: math/test-fexcept-traps UNSUPPORTED: math/test-nearbyint-except UNSUPPORTED: math/test-nearbyint-except-2 UNSUPPORTED: misc/tst-adjtimex UNSUPPORTED: misc/tst-clock_adjtime FAIL: misc/tst-misalign-clone FAIL: misc/tst-misalign-clone-internal UNSUPPORTED: misc/tst-ntp_adjtime UNSUPPORTED: misc/tst-pkey UNSUPPORTED: misc/tst-rseq UNSUPPORTED: misc/tst-rseq-disable UNSUPPORTED: misc/tst-syslog UNSUPPORTED: misc/tst-ttyname FAIL: nptl/test-cond-printers FAIL: nptl/test-condattr-printers FAIL: nptl/test-mutex-printers FAIL: nptl/test-mutexattr-printers FAIL: nptl/test-rwlock-printers FAIL: nptl/test-rwlockattr-printers UNSUPPORTED: nptl/tst-pthread-gdb-attach UNSUPPORTED: nptl/tst-pthread-gdb-attach-static UNSUPPORTED: nptl/tst-pthread-getattr UNSUPPORTED: nptl/tst-rseq-nptl UNSUPPORTED: nss/tst-nss-compat1 UNSUPPORTED: nss/tst-nss-db-endgrent UNSUPPORTED: nss/tst-nss-db-endpwent UNSUPPORTED: nss/tst-nss-files-hosts-long UNSUPPORTED: nss/tst-nss-gai-actions UNSUPPORTED: nss/tst-nss-test3 UNSUPPORTED: nss/tst-reload1 UNSUPPORTED: nss/tst-reload2 UNSUPPORTED: posix/bug-ga2 UNSUPPORTED: posix/bug-ga2-mem FAIL: posix/globtest UNSUPPORTED: posix/tst-vfork3 UNSUPPORTED: posix/tst-vfork3-mem UNSUPPORTED: resolv/mtrace-tst-leaks2 UNSUPPORTED: resolv/tst-leaks2 UNSUPPORTED: resolv/tst-resolv-ai_idn UNSUPPORTED: resolv/tst-resolv-ai_idn-latin1 UNSUPPORTED: resolv/tst-resolv-res_init UNSUPPORTED: resolv/tst-resolv-res_init-thread UNSUPPORTED: rt/tst-bz28213 UNSUPPORTED: rt/tst-mqueue1 UNSUPPORTED: rt/tst-mqueue10 UNSUPPORTED: rt/tst-mqueue2 UNSUPPORTED: rt/tst-mqueue3 UNSUPPORTED: rt/tst-mqueue4 UNSUPPORTED: rt/tst-mqueue5 UNSUPPORTED: rt/tst-mqueue6 UNSUPPORTED: rt/tst-mqueue8 UNSUPPORTED: rt/tst-mqueue8x UNSUPPORTED: rt/tst-mqueue9 UNSUPPORTED: stdlib/test-bz22786 UNSUPPORTED: stdlib/tst-system UNSUPPORTED: string/test-bcopy UNSUPPORTED: string/test-memmove UNSUPPORTED: string/tst-memmove-overflow UNSUPPORTED: string/tst-strerror UNSUPPORTED: string/tst-strsignal UNSUPPORTED: time/tst-clock_settime UNSUPPORTED: time/tst-settimeofday Summary of test results: 21 FAIL 4184 PASS 69 UNSUPPORTED 16 XFAIL 2 XPASS Signed-off-by: Shahab Vahedi <shahab@synopsys.com> Signed-off-by: Vineet Gupta <vineet.gupta@linux.dev>
* LoongArch: Add support for ilogb[f]Xiaolin Tang2022-11-292-0/+78
| | | | Add inline assembler for the ilogb functions. Passes GLIBC regression.
* LoongArch: Add support for scalb[f]Xiaolin Tang2022-11-292-0/+120
| | | | Add inline assembler for the scalb functions. Passes GLIBC regression.
* LoongArch: Add support for scalbn[f]Xiaolin Tang2022-11-292-0/+58
| | | | | | | | Add inline assembler for the scalbn functions. Passes GLIBC regression. GCC 13, LoongArch support ___builtin_scalbn{,f} with -fno-math-errno, but only "libm" can use -fno-math-errno in GLIBC, and scalbn is in libc instead of libm because __printf_fp calls it.