Bug 18696 - x86 bits/siginfo.h is out of date
Summary: x86 bits/siginfo.h is out of date
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: 2.22
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-20 15:38 UTC by H.J. Lu
Modified: 2015-07-24 11:24 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
Project(s) to access:
ssh public key:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description H.J. Lu 2015-07-20 15:38:45 UTC
Since kernel 3.19, struct siginfo has

                /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
                struct {
                        void __user *_addr; /* faulting insn/memory ref. */
#ifdef __ARCH_SI_TRAPNO
                        int _trapno;    /* TRAP # which caused the signal */
#endif
                        short _addr_lsb; /* LSB of the reported address */
                        struct {
                                void __user *_lower;
                                void __user *_upper;
                        } _addr_bnd;
                } _sigfault;

But sysdeps/unix/sysv/linux/x86/bits/siginfo.h has

        /* SIGILL, SIGFPE, SIGSEGV, SIGBUS.  */
        struct
          {
            void *si_addr;      /* Faulting insn/memory ref.  */
            short int si_addr_lsb;      /* Valid LSB of the reported address.  */
          } _sigfault;

I'd like to fix it for 2.22.
Comment 1 Sourceware Commits 2015-07-20 16:33:54 UTC
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, hjl/pr18696 has been created
        at  341681a4fe9eb585068b7a4f57ea52fa12e97a94 (commit)

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

commit 341681a4fe9eb585068b7a4f57ea52fa12e97a94
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Mon Jul 20 09:24:33 2015 -0700

    Add si_addr_bnd to _sigfault in x86 struct siginfo
    
    X86 struct siginfo in kernel 3.19 has been changed by
    
    commit ee1b58d36aa1b5a79eaba11f5c3633c88231da83
    Author: Qiaowei Ren <qiaowei.ren@intel.com>
    Date:   Fri Nov 14 07:18:19 2014 -0800
    
        mpx: Extend siginfo structure to include bound violation information
    
        This patch adds new fields about bound violation into siginfo
        structure. si_lower and si_upper are respectively lower bound
        and upper bound when bound violation is caused.
    
    This patch updates x86 struct siginfo to enable GDB with MPX support.
    
    	[BZ #18696]
    	* sysdeps/unix/sysv/linux/x86/bits/siginfo.h (_sigfault): Add
    	si_addr_bnd.
    	(si_lower): New.
    	(si_upper): Likewise.

-----------------------------------------------------------------------
Comment 2 Sourceware Commits 2015-07-20 18:55:50 UTC
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  d4358b51c26a634eb885955aea06cad26af6f696 (commit)
      from  d87630edc49200e7892b56a6ceb116ffb8e17c38 (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=d4358b51c26a634eb885955aea06cad26af6f696

commit d4358b51c26a634eb885955aea06cad26af6f696
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Mon Jul 20 11:54:39 2015 -0700

    Add si_addr_bnd to _sigfault in x86 struct siginfo
    
    X86 struct siginfo in kernel 3.19 has been changed by
    
    commit ee1b58d36aa1b5a79eaba11f5c3633c88231da83
    Author: Qiaowei Ren <qiaowei.ren@intel.com>
    Date:   Fri Nov 14 07:18:19 2014 -0800
    
        mpx: Extend siginfo structure to include bound violation information
    
        This patch adds new fields about bound violation into siginfo
        structure. si_lower and si_upper are respectively lower bound
        and upper bound when bound violation is caused.
    
    This patch updates x86 struct siginfo to enable GDB with MPX support.
    
    	[BZ #18696]
    	* sysdeps/unix/sysv/linux/x86/bits/siginfo.h (_sigfault): Add
    	si_addr_bnd.
    	(si_lower): New.
    	(si_upper): Likewise.

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

Summary of changes:
 ChangeLog                                  |    8 ++++++++
 NEWS                                       |    2 +-
 sysdeps/unix/sysv/linux/x86/bits/siginfo.h |    7 +++++++
 3 files changed, 16 insertions(+), 1 deletions(-)
Comment 3 H.J. Lu 2015-07-20 18:56:35 UTC
Fixed for 2.22.