glibc/sysdeps
Adhemerval Zanella 2d3fefd7ce 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.

(cherry picked from commit a008c76b56e4f958cf5a0d6f67d29fade89421b7)
2019-07-15 09:26:39 -03:00
..
aarch64 aarch64: handle STO_AARCH64_VARIANT_PCS 2019-07-12 10:14:12 +01:00
alpha alpha: Fix __remqu corrupting $f3 register 2019-01-24 10:28:13 -08:00
arm arm: Use "nr" constraint for Systemtap probes [BZ #24164] 2019-02-05 13:49:03 +01:00
csky Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
generic posix: Fix large mmap64 offset for mips64n32 (BZ#24699) 2019-07-15 09:26:39 -03:00
gnu Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
hppa Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
htl hurd: advertise *_setpshared as not supported 2019-01-02 22:21:34 +01:00
hurd Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
i386 i386: Remove bogus THREAD_ATOMIC_* macros 2019-01-03 18:38:15 -02:00
ia64 Fix a few typos in comments 2019-01-12 13:44:51 +00:00
ieee754 Fix a few typos in comments 2019-01-12 13:44:51 +00:00
init_array Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
m68k Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
mach hurd: Check at_flags passed to faccessat 2019-01-22 22:47:10 +01:00
microblaze Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
mips Update MIPS libm-test-ulps. 2019-01-02 17:25:33 +00:00
nios2 Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
nptl nptl: Avoid fork handler lock for async-signal-safe fork [BZ #24161] 2019-02-08 12:54:41 +01:00
posix CVE-2016-10739: getaddrinfo: Fully parse IPv4 address strings [BZ #20018] 2019-01-21 21:26:03 +01:00
powerpc Fix output of LD_SHOW_AUXV=1. 2019-03-13 10:51:23 +01:00
pthread Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
riscv RISC-V: Update nofpu ULPs 2019-01-24 13:55:05 -05:00
s390 S390: Mark vx and vxe as important hwcap. 2019-03-21 09:27:37 +01:00
sh Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
sparc Fix output of LD_SHOW_AUXV=1. 2019-03-13 10:51:23 +01:00
unix posix: Fix large mmap64 offset for mips64n32 (BZ#24699) 2019-07-15 09:26:39 -03:00
wordsize-32 Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
wordsize-64 Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
x86 Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
x86_64 x86-64 memcmp: Use unsigned Jcc instructions on size [BZ #24155] 2019-02-04 12:27:04 -08:00