summaryrefslogtreecommitdiff
path: root/include/linux/compat.h
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2017-07-31 10:08:59 -0500
committerEric W. Biederman <ebiederm@xmission.com>2018-01-15 17:42:32 -0600
commitb68a68d3dcc15ebbf23cbe91af1abf57591bd96b (patch)
tree711f9e8083ef7cc43b9338d57b61d441b58c9b90 /include/linux/compat.h
parentb713da69e4c91d9addada4e58d26df1c9b5cd840 (diff)
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/linux/compat.h')
-rw-r--r--include/linux/compat.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/include/linux/compat.h b/include/linux/compat.h
index 8f8e3ef247de..e698ec1908d9 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -221,15 +221,23 @@ typedef struct compat_siginfo {
#ifdef __ARCH_SI_TRAPNO
int _trapno; /* TRAP # which caused the signal */
#endif
- short int _addr_lsb; /* Valid LSB of the reported address. */
union {
+ /*
+ * used when si_code=BUS_MCEERR_AR or
+ * used when si_code=BUS_MCEERR_AO
+ */
+ short int _addr_lsb; /* Valid LSB of the reported address. */
/* used when si_code=SEGV_BNDERR */
struct {
+ short _dummy_bnd;
compat_uptr_t _lower;
compat_uptr_t _upper;
} _addr_bnd;
/* used when si_code=SEGV_PKUERR */
- u32 _pkey;
+ struct {
+ short _dummy_pkey;
+ u32 _pkey;
+ } _addr_pkey;
};
} _sigfault;