mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
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>
This commit is contained in:
parent
b713da69e4
commit
b68a68d3dc
2 changed files with 21 additions and 5 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue