History

signal: Correct the offset of si_pkey in struct siginfo

The change moving addr_lsb into the _sigfault union failed to take into account that _sigfault._addr_bnd._lower being a pointer forced the entire union to have pointer alignment. In practice this only mattered for the offset of si_pkey which is why this has taken so long to discover. To correct this change _dummy_pkey and _dummy_bnd to have pointer type.

Eric W. Biederman committed 8 years ago

Commit 859d8801 parent 9026e822 files · +4 −4Browse files

Showing the changes to include/uapi (1 of 2 files). Show all

Unified · Split

include/uapi/asm-generic/siginfo.h+2−2
@@ -102,13 +102,13 @@ typedef struct siginfo { · 101 unmodified lines
102 short _addr_lsb; /* LSB of the reported address */102 short _addr_lsb; /* LSB of the reported address */
103 /* used when si_code=SEGV_BNDERR */103 /* used when si_code=SEGV_BNDERR */
104 struct {104 struct {
105 short _dummy_bnd;105 void *_dummy_bnd;
106 void __user *_lower;106 void __user *_lower;
107 void __user *_upper;107 void __user *_upper;
108 } _addr_bnd;108 } _addr_bnd;
109 /* used when si_code=SEGV_PKUERR */109 /* used when si_code=SEGV_PKUERR */
110 struct {110 struct {
111 short _dummy_pkey;111 void *_dummy_pkey;
112 __u32 _pkey;112 __u32 _pkey;
113 } _addr_pkey;113 } _addr_pkey;
114 };114 };