mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-03 10:21:05 +00:00
d3573f61ac
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. |
||
---|---|---|
.. | ||
bits | ||
wordsize-32 | ||
____longjmp_chk.c | ||
access.c | ||
brk.c | ||
chmod.c | ||
chown.c | ||
creat.c | ||
dl-origin.c | ||
dup2.c | ||
epoll_create.c | ||
epoll_wait.c | ||
futimesat.c | ||
getdents64.c | ||
getdents.c | ||
inotify_init.c | ||
kernel_stat.h | ||
lchown.c | ||
link.c | ||
lxstat.c | ||
Makefile | ||
mkdir.c | ||
open64.c | ||
open.c | ||
pause.c | ||
pipe.c | ||
poll.c | ||
readlink_chk.c | ||
readlink.c | ||
README | ||
recv.c | ||
rename.c | ||
rmdir.c | ||
select.c | ||
send.c | ||
symlink.c | ||
syscalls.list | ||
sysctl.c | ||
sysdep.h | ||
umount.c | ||
unlink.c | ||
ustat.c | ||
utimes.c | ||
xmknod.c | ||
xstat.c |
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.