Eric W. Biederman
8420f71943
signal: Correct the offset of si_pkey and si_lower in struct siginfo on m68k
...
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. The fix for
_sigfault._addr_bnd._lower having pointer alignment failed to take
into account that m68k has a pointer alignment less than the size
of a pointer. So simply making the padding members pointers changed
the location of later members in the structure.
Fix this by directly computing the needed size of the padding members,
and making the padding members char arrays of the needed size. AKA
if __alignof__(void *) is 1 sizeof(short) otherwise __alignof__(void *).
Which should be exactly the same rules the compiler whould have
used when computing the padding.
I have tested this change by adding BUILD_BUG_ONs to m68k to verify
the offset of every member of struct siginfo, and with those testing
that the offsets of the fields in struct siginfo is the same before
I changed the generic _sigfault member and after the correction
to the _sigfault member.
I have also verified that the x86 with it's own BUILD_BUG_ONs to verify
the offsets of the siginfo members also compiles cleanly.
Cc: stable@vger.kernel.org
Reported-by: Eugene Syromiatnikov <esyr@redhat.com>
Fixes: 859d880cf5 ("signal: Correct the offset of si_pkey in struct siginfo")
Fixes: b68a68d3dc ("signal: Move addr_lsb into the _sigfault union for clarity")
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
2018-04-02 15:09:58 -05:00
..
auxvec.h
UAPI: (Scripted) Disintegrate include/asm-generic
2012-10-04 18:20:15 +01:00
bitsperlong.h
License cleanup: add SPDX license identifier to uapi header files with no license
2017-11-02 11:19:54 +01:00
bpf_perf_event.h
bpf: correct broken uapi for BPF_PROG_TYPE_PERF_EVENT program type
2017-12-05 15:02:40 +01:00
errno-base.h
License cleanup: add SPDX license identifier to uapi header files with no license
2017-11-02 11:19:54 +01:00
errno.h
License cleanup: add SPDX license identifier to uapi header files with no license
2017-11-02 11:19:54 +01:00
fcntl.h
License cleanup: add SPDX license identifier to uapi header files with no license
2017-11-02 11:19:54 +01:00
hugetlb_encode.h
mm: hugetlb: define system call hugetlb size encodings in single file
2017-09-06 17:27:28 -07:00
int-l64.h
License cleanup: add SPDX license identifier to uapi header files with no license
2017-11-02 11:19:54 +01:00
int-ll64.h
License cleanup: add SPDX license identifier to uapi header files with no license
2017-11-02 11:19:54 +01:00
ioctl.h
License cleanup: add SPDX license identifier to uapi header files with no license
2017-11-02 11:19:54 +01:00
ioctls.h
License cleanup: add SPDX license identifier to uapi header files with no license
2017-11-02 11:19:54 +01:00
ipcbuf.h
License cleanup: add SPDX license identifier to uapi header files with no license
2017-11-02 11:19:54 +01:00
Kbuild.asm
uapi: export all headers under uapi directories
2017-05-11 00:21:54 +09:00
kvm_para.h
UAPI: Put a comment into uapi/asm-generic/kvm_para.h and use it from arches
2012-10-17 12:32:07 +01:00
mman-common.h
libnvdimm for 4.15
2017-11-17 09:51:57 -08:00
mman.h
libnvdimm for 4.15
2017-11-17 09:51:57 -08:00
msgbuf.h
License cleanup: add SPDX license identifier to uapi header files with no license
2017-11-02 11:19:54 +01:00
param.h
License cleanup: add SPDX license identifier to uapi header files with no license
2017-11-02 11:19:54 +01:00
poll.h
unify {de,}mangle_poll(), get rid of kernel-side POLL...
2018-02-11 14:37:22 -08:00
posix_types.h
License cleanup: add SPDX license identifier to uapi header files with no license
2017-11-02 11:19:54 +01:00
resource.h
License cleanup: add SPDX license identifier to uapi header files with no license
2017-11-02 11:19:54 +01:00
sembuf.h
License cleanup: add SPDX license identifier to uapi header files with no license
2017-11-02 11:19:54 +01:00
setup.h
License cleanup: add SPDX license identifier to uapi header files with no license
2017-11-02 11:19:54 +01:00
shmbuf.h
License cleanup: add SPDX license identifier to uapi header files with no license
2017-11-02 11:19:54 +01:00
shmparam.h
License cleanup: add SPDX license identifier to uapi header files with no license
2017-11-02 11:19:54 +01:00
siginfo.h
signal: Correct the offset of si_pkey and si_lower in struct siginfo on m68k
2018-04-02 15:09:58 -05:00
signal-defs.h
License cleanup: add SPDX license identifier to uapi header files with no license
2017-11-02 11:19:54 +01:00
signal.h
License cleanup: add SPDX license identifier to uapi header files with no license
2017-11-02 11:19:54 +01:00
socket.h
License cleanup: add SPDX license identifier to uapi header files with no license
2017-11-02 11:19:54 +01:00
sockios.h
License cleanup: add SPDX license identifier to uapi header files with no license
2017-11-02 11:19:54 +01:00
stat.h
License cleanup: add SPDX license identifier to uapi header files with no license
2017-11-02 11:19:54 +01:00
statfs.h
License cleanup: add SPDX license identifier to uapi header files with no license
2017-11-02 11:19:54 +01:00
swab.h
License cleanup: add SPDX license identifier to uapi header files with no license
2017-11-02 11:19:54 +01:00
termbits.h
License cleanup: add SPDX license identifier to uapi header files with no license
2017-11-02 11:19:54 +01:00
termios.h
License cleanup: add SPDX license identifier to uapi header files with no license
2017-11-02 11:19:54 +01:00
types.h
License cleanup: add SPDX license identifier to uapi header files with no license
2017-11-02 11:19:54 +01:00
ucontext.h
License cleanup: add SPDX license identifier to uapi header files with no license
2017-11-02 11:19:54 +01:00
unistd.h
License cleanup: add SPDX license identifier to uapi header files with no license
2017-11-02 11:19:54 +01:00