This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/19550] [mips] mmap negative offset handling inconsistent with other architectures


https://sourceware.org/bugzilla/show_bug.cgi?id=19550

--- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  5163b4b76f61e361f0f4bbe3b96732b12e5c9b1a (commit)
      from  0f0f4db5b76c27a7fe5a4247e09c314d4e15c34f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=5163b4b76f61e361f0f4bbe3b96732b12e5c9b1a

commit 5163b4b76f61e361f0f4bbe3b96732b12e5c9b1a
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Mon Feb 1 18:20:21 2016 +0000

    Fix MIPS mmap negative offset handling for consistency (bug 19550).

    The handling of negative offsets in MIPS mmap is inconsistent with
    other architectures, as shown by failure of the test
    posix/tst-mmap-offset for o32 and n32.  The MIPS mmap syscall uses a
    signed argument and does a signed arithmetic shift on it, whereas the
    glibc semantics expected by that test are for the offset to be
    considered as a large positive offset.  This patch makes MIPS
    consistent with other architectures as far as possible by using the
    mmap2 syscall on o32 (#including the generic implementation), and
    making mmap not an alias for mmap64 for n32, with a custom
    implementation for n32 that zero-extends the offset argument to 64-bit
    before calling the mmap syscall.

    Tested for MIPS64 (o32, n32, n64).

        [BZ #19550]
        * sysdeps/unix/sysv/linux/mips/mips32/mmap.c: New file.
        * sysdeps/unix/sysv/linux/mips/mips64/mmap64.c: Move to ....
        * sysdeps/unix/sysv/linux/mips/mips64/n64/mmap64.c: ... here.
        * sysdeps/unix/sysv/linux/mips/mips64/n32/mmap.c: New file.
        * sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list (mmap64):
        New syscall entry.
        * sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list (mmap):
        New syscall entry.
        * sysdeps/unix/sysv/linux/mips/mips64/syscalls.list (mmap): Remove
        syscall entry.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                                          |   14 +++++++++++++
 sysdeps/unix/sysv/linux/mips/mips32/mmap.c         |    1 +
 .../wordsize-32 => mips/mips64/n32}/mmap.c         |   21 +++++++------------
 .../unix/sysv/linux/mips/mips64/n32/syscalls.list  |    2 +
 .../unix/sysv/linux/mips/mips64/{ => n64}/mmap64.c |    0
 .../unix/sysv/linux/mips/mips64/n64/syscalls.list  |    2 +
 sysdeps/unix/sysv/linux/mips/mips64/syscalls.list  |    2 -
 7 files changed, 27 insertions(+), 15 deletions(-)
 create mode 100644 sysdeps/unix/sysv/linux/mips/mips32/mmap.c
 copy sysdeps/unix/sysv/linux/{generic/wordsize-32 => mips/mips64/n32}/mmap.c
(69%)
 rename sysdeps/unix/sysv/linux/mips/mips64/{ => n64}/mmap64.c (100%)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]