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/21548] [mips] get/set/make/swap context for MIPS O32 assume wrong size for general purpose registers in mcontext_t structure


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

--- 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  b309f058cf7639951bebb86270ffbc116ea5f720 (commit)
      from  c2528fef3b05bcffb1ac27c6c09cc3ff24b7f03f (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=b309f058cf7639951bebb86270ffbc116ea5f720

commit b309f058cf7639951bebb86270ffbc116ea5f720
Author: Gordana Cmiljanovic <Gordana.Cmiljanovic@imgtec.com>
Date:   Tue Jun 13 21:34:45 2017 +0000

    mips: Fix store/load gp registers to/from ucontext_t

    General purpose registers in mcontext_t structure
    are 8 bytes long for both MIPS32/MIPS64.

    get/set/make/swap context implementations for MIPS O32
    incorrectly assume that general purpose registers
    in this structure are 4 bytes long.

    This patch is fixing that.

    Tested for MIPS O32 LE and BE.
    Compared objdump of modified functions for mips n32 and mips n64.

        [BZ #21548]
        * sysdeps/unix/sysv/linux/mips/getcontext.S: Define MCONTEXT_SZGREG as
        8 and use it when copying general purpose registers.
        * sysdeps/unix/sysv/linux/mips/makecontext.S: Likewise.
        * sysdeps/unix/sysv/linux/mips/mips32/Makefile: Include new test for
        mips o32.
        * sysdeps/unix/sysv/linux/mips/mips32/bug-getcontext-mips-gp.c: Added
        new test for mips o32.
        * sysdeps/unix/sysv/linux/mips/setcontext.S: Define MCONTEXT_SZGREG as
        8 and use it when copying general purpose registers.
        * sysdeps/unix/sysv/linux/mips/swapcontext.S: Likewise.

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

Summary of changes:
 ChangeLog                                          |   14 ++++
 sysdeps/unix/sysv/linux/mips/getcontext.S          |   37 ++++++----
 sysdeps/unix/sysv/linux/mips/makecontext.S         |   27 +++++--
 sysdeps/unix/sysv/linux/mips/mips32/Makefile       |    4 +
 .../linux/mips/mips32/bug-getcontext-mips-gp.c     |   59 +++++++--------
 sysdeps/unix/sysv/linux/mips/setcontext.S          |   51 +++++++------
 sysdeps/unix/sysv/linux/mips/swapcontext.S         |   79 +++++++++++---------
 7 files changed, 157 insertions(+), 114 deletions(-)
 copy elf/tst-auxv.c =>
sysdeps/unix/sysv/linux/mips/mips32/bug-getcontext-mips-gp.c (51%)

-- 
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]