glibc/sysdeps/unix/sysv/linux/mips
Adhemerval Zanella edcda4c08a mips: Do not malloc on getdents64 fallback
This patch changes how the fallback getdents64 implementation calls
non-LFS getdents by replacing the scratch_buffer with static buffer
plus a loop on getdents calls.  This avoids the potential malloc
call on scratch_buffer_set_array_size for large input buffer size
at the cost of more getdents syscalls.

It also adds a small optimization for older kernels, where the first
ENOSYS failure for getdents64 disable subsequent calls.

Check the dirent tests on a mips64-linux-gnu with getdents64 code
disabled.

	* sysdeps/unix/sysv/linux/mips/mips64/getdents64.c (__getdents64):
	Add small optimization for older kernel to avoid issuing
	__NR_getdents64 on each call and replace scratch_buffer usage with
	a static allocated buffer.

Reviewed-by: Florian Weimer <fweimer@redhat.com>
2019-10-09 17:34:38 -03:00
..
bits Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
mips32 nptl: Move pthread_attr_setschedparam implementation into libc 2019-10-07 20:00:38 +02:00
mips64 mips: Do not malloc on getdents64 fallback 2019-10-09 17:34:38 -03:00
sys Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
____longjmp_chk.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
_test_and_set.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
brk.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
clone.S Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
configure mips: Force RWX stack for hard-float builds that can run on pre-4.8 kernels 2019-08-23 16:38:04 +00:00
configure.ac mips: Force RWX stack for hard-float builds that can run on pre-4.8 kernels 2019-08-23 16:38:04 +00:00
dl-cache.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
dl-static.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
getcontext.S Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
getrlimit64.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
getsysstats.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
Implies NPTL is no longer an add-on! 2014-07-07 09:29:06 -07:00
kernel_rt_sigframe.h Rename struct ucontext tag (bug 21457). 2017-06-26 22:03:58 +00:00
kernel_sigaction.h linux: Consolidate sigaction implementation 2018-04-05 17:09:50 -03:00
kernel_stat.h Allow [f]statfs64 to alias [f]statfs 2016-11-22 09:59:12 -08:00
kernel_termios.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
kernel-features.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
ldsodefs.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
libc-abis MIPS support for GNU hash 2019-08-29 20:11:42 +00:00
makecontext.S Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
Makefile mips: Force RWX stack for hard-float builds that can run on pre-4.8 kernels 2019-08-23 16:38:04 +00:00
mmap_info.h posix: Fix large mmap64 offset for mips64n32 (BZ#24699) 2019-07-10 16:52:50 -03:00
pipe.S Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
readelflib.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
register-dump.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
setcontext.S Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
setrlimit64.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
shlib-versions Remove configuration name patterns from shlib-versions. 2014-09-12 12:28:47 +00:00
sigcontextinfo.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
swapcontext.S Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
syscalls.list Consolidate Linux send implementation 2017-03-09 15:22:06 +01:00
sysdep.h Fix vDSO initialization on arm and mips 2019-09-24 13:40:26 +02:00
ucontext_i.sym Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
ustat.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
Versions VDSO support for MIPS 2016-04-12 11:05:13 +01:00
vfork.S Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
xstatconv.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00