diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2017-07-31 18:08:59 +0300 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2018-01-16 02:42:32 +0300 |
commit | b68a68d3dcc15ebbf23cbe91af1abf57591bd96b (patch) | |
tree | 711f9e8083ef7cc43b9338d57b61d441b58c9b90 /include/uapi | |
parent | b713da69e4c91d9addada4e58d26df1c9b5cd840 (diff) | |
download | linux-b68a68d3dcc15ebbf23cbe91af1abf57591bd96b.tar.xz |
signal: Move addr_lsb into the _sigfault union for clarity
The addr_lsb fields is only valid and available when the
signal is SIGBUS and the si_code is BUS_MCEERR_AR or BUS_MCEERR_AO.
Document this with a comment and place the field in the _sigfault union
to make this clear.
All of the fields stay in the same physical location so both the old
and new definitions of struct siginfo will continue to work.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'include/uapi')
-rw-r--r-- | include/uapi/asm-generic/siginfo.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/include/uapi/asm-generic/siginfo.h b/include/uapi/asm-generic/siginfo.h index d32f62a7f95c..eef4d778a5d4 100644 --- a/include/uapi/asm-generic/siginfo.h +++ b/include/uapi/asm-generic/siginfo.h @@ -94,15 +94,23 @@ typedef struct siginfo { unsigned int _flags; /* see ia64 si_flags */ unsigned long _isr; /* isr */ #endif - short _addr_lsb; /* LSB of the reported address */ union { + /* + * used when si_code=BUS_MCEERR_AR or + * used when si_code=BUS_MCEERR_AO + */ + short _addr_lsb; /* LSB of the reported address */ /* used when si_code=SEGV_BNDERR */ struct { + short _dummy_bnd; void __user *_lower; void __user *_upper; } _addr_bnd; /* used when si_code=SEGV_PKUERR */ - __u32 _pkey; + struct { + short _dummy_pkey; + __u32 _pkey; + } _addr_pkey; }; } _sigfault; @@ -142,7 +150,7 @@ typedef struct siginfo { #define si_addr_lsb _sifields._sigfault._addr_lsb #define si_lower _sifields._sigfault._addr_bnd._lower #define si_upper _sifields._sigfault._addr_bnd._upper -#define si_pkey _sifields._sigfault._pkey +#define si_pkey _sifields._sigfault._addr_pkey._pkey #define si_band _sifields._sigpoll._band #define si_fd _sifields._sigpoll._fd #define si_call_addr _sifields._sigsys._call_addr |