glibc/sysdeps/unix/sysv/linux/generic
Adhemerval Zanella d3573f61ac Fix wordsize-32 mmap offset for negative value (BZ#18877)
This patch fixes the default wordsize-32 mmap implementation offset
calculation for negative values.  Current code uses signed shift
operation to calculate the multiple size to use with syscall and
it is implementation defined.  Change it to use a division base
on mmap page size (default being as before, 4096).

Tested on armv7hf.

	[BZ #18877]
	* posix/Makefile (tests): Add tst-mmap-offset.
	* posix/tst-mmap.c: New file.
	* sysdeps/unix/sysv/linux/generic/wordsize-32/mmap.c (__mmap): Fix
	offset calculation for negative values.
2015-08-28 10:42:07 -03:00
..
bits struct stat is not posix conform 2015-05-26 22:27:24 +05:30
wordsize-32 Fix wordsize-32 mmap offset for negative value (BZ#18877) 2015-08-28 10:42:07 -03:00
____longjmp_chk.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
access.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
brk.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
chmod.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
chown.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
creat.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
dl-origin.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
dup2.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
epoll_create.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
epoll_wait.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
futimesat.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
getdents64.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
getdents.c Move tilegx, tilepro, and linux-generic from ports to libc. 2014-02-10 11:04:39 -05:00
inotify_init.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
kernel_stat.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
lchown.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
link.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
lxstat.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
Makefile Move tilegx, tilepro, and linux-generic from ports to libc. 2014-02-10 11:04:39 -05:00
mkdir.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
open64.c nptl: Rewrite cancellation macros 2015-06-04 18:58:36 -03:00
open.c nptl: Rewrite cancellation macros 2015-06-04 18:58:36 -03:00
pause.c nptl: Rewrite cancellation macros 2015-06-04 18:58:36 -03:00
pipe.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
poll.c nptl: Rewrite cancellation macros 2015-06-04 18:58:36 -03:00
readlink_chk.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
readlink.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
README linux-generic: add a README 2015-03-19 13:33:01 -04:00
recv.c Fix mq_notify socket, recv namespace (bug 18546). 2015-06-17 20:20:08 +00:00
rename.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
rmdir.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
select.c nptl: Rewrite cancellation macros 2015-06-04 18:58:36 -03:00
send.c nptl: Rewrite cancellation macros 2015-06-04 18:58:36 -03:00
symlink.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
syscalls.list Move tilegx, tilepro, and linux-generic from ports to libc. 2014-02-10 11:04:39 -05:00
sysctl.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
sysdep.h nptl: Rewrite cancellation macros 2015-06-04 18:58:36 -03:00
umount.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
unlink.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
ustat.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
utimes.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
xmknod.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
xstat.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00

This hierarchy supports Linux systems using the new
asm-generic/unistd.h, which removes many familiar old syscalls.  For
example, to implement open(), newer Linux architectures require glibc
to invoke the __NR_openat syscall with AT_FDCWD.  This hierarchy
provides all those implementations.

It also provides support for 32-bit platforms using the 64-bit kernel
syscall APIs, as the 32-bit ones are no longer provided.  Note that
newer ILP32 environments (x32 or AArch64:ILP32, for example) are
converting to use more 64-bit types in kernel syscalls, so that aspect
of this support is in more flux as of this writing.