aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-01-02 20:27:46 +0000
committerUlrich Drepper <drepper@redhat.com>2000-01-02 20:27:46 +0000
commit29b3c4f2ad92ac2f4176b3cff5c33ef24d82aac1 (patch)
treed3c9126e535db48b04ad3e11b5f3bb6aac1f5ca4
parentf91dc2d2e77f6708b4ef91bc8049dab73908f9c5 (diff)
downloadglibc-29b3c4f2ad92ac2f4176b3cff5c33ef24d82aac1.tar
glibc-29b3c4f2ad92ac2f4176b3cff5c33ef24d82aac1.tar.gz
glibc-29b3c4f2ad92ac2f4176b3cff5c33ef24d82aac1.tar.bz2
glibc-29b3c4f2ad92ac2f4176b3cff5c33ef24d82aac1.zip
Update.
* sysdeps/unix/sysv/linux/i386/mmap64.S: Handle unaligned offsets. * sysdeps/unix/sysv/linux/i386/mmap.S: Likewise.
-rw-r--r--ChangeLog3
-rw-r--r--sysdeps/unix/sysv/linux/i386/mmap.S11
-rw-r--r--sysdeps/unix/sysv/linux/i386/mmap64.S8
3 files changed, 15 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 1229670dd0..4e39b0112a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2000-01-02 Ulrich Drepper <drepper@cygnus.com>
+ * sysdeps/unix/sysv/linux/i386/mmap64.S: Handle unaligned offsets.
+ * sysdeps/unix/sysv/linux/i386/mmap.S: Likewise.
+
* iconvdata/ksc5601.c (__ksc5601_sym_to_ucs): Add mapping for
0xa2e6 and 0xa2e7.
(__ksc5601_sym_from_ucs): Add mapping back from U00AE and U20AC.
diff --git a/sysdeps/unix/sysv/linux/i386/mmap.S b/sysdeps/unix/sysv/linux/i386/mmap.S
index 0397f841f1..46d26125a5 100644
--- a/sysdeps/unix/sysv/linux/i386/mmap.S
+++ b/sysdeps/unix/sysv/linux/i386/mmap.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -36,19 +36,22 @@ ENTRY (__mmap)
pushl %esi
pushl %edi
- movl $SYS_ify(mmap2), %eax /* System call number in %eax. */
-
movl 20(%esp), %ebx
movl 24(%esp), %ecx
movl 28(%esp), %edx
movl 32(%esp), %esi
movl 36(%esp), %edi
movl 40(%esp), %ebp
+ testl $0x3ff, %ebp
+ movl $-EINVAL, %eax
+ jne L(skip)
shrl $12, %ebp /* mmap2 takes the offset in pages. */
+ movl $SYS_ify(mmap2), %eax /* System call number in %eax. */
+
/* Do the system call trap. */
int $0x80
-
+L(skip):
/* Restore registers. */
popl %edi
popl %esi
diff --git a/sysdeps/unix/sysv/linux/i386/mmap64.S b/sysdeps/unix/sysv/linux/i386/mmap64.S
index 4a30185f25..346bb52b5f 100644
--- a/sysdeps/unix/sysv/linux/i386/mmap64.S
+++ b/sysdeps/unix/sysv/linux/i386/mmap64.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -35,10 +35,10 @@ ENTRY (__mmap64)
pushl %esi
pushl %edi
- movl $SYS_ify(mmap2), %eax /* System call number in %eax. */
-
movl 40(%esp), %edx
movl 44(%esp), %ecx
+ testl $0x3ff, %edx
+ jne L(einval)
shrdl $12, %ecx, %edx /* mmap2 takes the offset in pages. */
shrl $12, %ecx
jne L(einval)
@@ -50,6 +50,8 @@ ENTRY (__mmap64)
movl 32(%esp), %esi
movl 36(%esp), %edi
+ movl $SYS_ify(mmap2), %eax /* System call number in %eax. */
+
/* Do the system call trap. */
L(do_syscall):
int $0x80