glibc/sysdeps/unix/sysv/linux/mips
Adhemerval Zanella a008c76b56 posix: Fix large mmap64 offset for mips64n32 (BZ#24699)
The fix for BZ#21270 (commit 158d5fa0e1) added a mask to avoid offset larger
than 1^44 to be used along __NR_mmap2.  However mips64n32 users __NR_mmap,
as mips64n64, but still defines off_t as old non-LFS type (other ILP32, such
x32, defines off_t being equal to off64_t).  This leads to use the same
mask meant only for __NR_mmap2 call for __NR_mmap, thus limiting the maximum
offset it can use with mmap64.

This patch fixes by setting the high mask only for __NR_mmap2 usage. The
posix/tst-mmap-offset.c already tests it and also fails for mips64n32. The
patch also change the test to check for an arch-specific header that defines
the maximum supported offset.

Checked on x86_64-linux-gnu, i686-linux-gnu, and I also tests tst-mmap-offset
on qemu simulated mips64 with kernel 3.2.0 kernel for both mips-linux-gnu and
mips64-n32-linux-gnu.

	[BZ #24699]
	* posix/tst-mmap-offset.c: Mention BZ #24699.
	(do_test_bz21270): Rename to do_test_large_offset and use
	mmap64_maximum_offset to check for maximum expected offset value.
	* sysdeps/generic/mmap_info.h: New file.
	* sysdeps/unix/sysv/linux/mips/mmap_info.h: Likewise.
	* sysdeps/unix/sysv/linux/mmap64.c (MMAP_OFF_HIGH_MASK): Define iff
	__NR_mmap2 is used.
2019-07-10 16:52:50 -03:00
..
bits termios: Consolidate termios.h 2019-01-03 09:32:12 -02:00
mips32 nptl: Remove vfork IFUNC-based forwarder from libpthread [BZ #20188] 2019-07-02 16:51:13 +02:00
mips64 nptl: Remove vfork IFUNC-based forwarder from libpthread [BZ #20188] 2019-07-02 16:51:13 +02:00
sys Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
Implies
Makefile
Versions
____longjmp_chk.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
_test_and_set.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
brk.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
clone.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
configure LIBC_SLIBDIR_RTLDDIR: substitute arguments in single quotes 2018-01-25 17:20:28 +01:00
configure.ac
dl-cache.h Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
dl-static.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
getcontext.S mips: Remove rt_sigreturn usage on context function 2019-04-17 15:14:45 -03:00
getrlimit64.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
getsysstats.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
init-first.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
kernel-features.h Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
kernel_rt_sigframe.h
kernel_sigaction.h linux: Consolidate sigaction implementation 2018-04-05 17:09:50 -03:00
kernel_stat.h
kernel_termios.h termios: Consolidate struct termios 2019-01-03 09:32:12 -02:00
ldsodefs.h Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
libc-abis libc-abis: Define ABSOLUTE ABI [BZ #19818][BZ #23307] 2018-07-05 18:06:43 +01:00
libc-vdso.h Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
makecontext.S mips: Remove rt_sigreturn usage on context function 2019-04-17 15:14:45 -03:00
mmap_info.h posix: Fix large mmap64 offset for mips64n32 (BZ#24699) 2019-07-10 16:52:50 -03:00
pipe.S
profil-counter.h
readelflib.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
register-dump.h Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
setcontext.S mips: Remove rt_sigreturn usage on context function 2019-04-17 15:14:45 -03:00
setrlimit64.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
shlib-versions
sigcontextinfo.h Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
swapcontext.S mips: Remove rt_sigreturn usage on context function 2019-04-17 15:14:45 -03:00
syscalls.list
ucontext_i.sym
ustat.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
vfork.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
xstatconv.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00