]> Cypherpunks repositories - gostls13.git/commit
runtime: add padding to Linux kernel structures
authorRhys Hiltner <rhys@justin.tv>
Thu, 30 Sep 2021 00:35:27 +0000 (17:35 -0700)
committerMichael Pratt <mpratt@google.com>
Mon, 4 Oct 2021 21:10:16 +0000 (21:10 +0000)
commitf0db7eae74ea235e9fbc2598252bfd46c1cc5510
tree049a87ed3f3bc9264c5942d99818e371371a5c72
parente8a85e90aca4adb472c66f8c42f6d4a41b8cca99
runtime: add padding to Linux kernel structures

Go exchanges siginfo and sigevent structures with the kernel. They
contain unions, but Go's use is limited to the first few fields. Pad out
the rest so the size Go sees is the same as what the Linux kernel sees.

This is a follow-up to CL 342052 which added the sigevent struct without
padding. It updates the siginfo struct as well so there are no bad
examples in the defs_linux_*.go files.

Change-Id: Id991d4a57826677dd7e6cc30ad113fa3b321cddf
Reviewed-on: https://go-review.googlesource.com/c/go/+/353136
Run-TryBot: Rhys Hiltner <rhys@justin.tv>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Michael Pratt <mpratt@google.com>
Trust: Michael Knyszek <mknyszek@google.com>
src/runtime/defs_linux_386.go
src/runtime/defs_linux_amd64.go
src/runtime/defs_linux_arm.go
src/runtime/defs_linux_arm64.go
src/runtime/defs_linux_mips64x.go
src/runtime/defs_linux_mipsx.go
src/runtime/defs_linux_ppc64.go
src/runtime/defs_linux_ppc64le.go
src/runtime/defs_linux_riscv64.go
src/runtime/defs_linux_s390x.go
src/runtime/os_linux.go