linux/include/uapi
Jason Gunthorpe 958d2c1ba3 RDMA/bnxt: Fix structure layout for bnxt_re_pd_resp
What is going on here is a bit subtle, in the kernel there is no
problem because the struct is copied using copy_from_user, so it
can safely have an 8 byte alignment, however in userspace it must
be constructed by concatenation with the ib_uverbs_alloc_pd_resp
struct. This is due to the required memory layout to execute the
command.

Since ibv_uverbs_alloc_pd_resp is only 4 bytes long, this causes
misalignment, and the user space will experience an unexpected padding.
Currently it works around this via pointer maths.

Make everything more robust by having the compiler reduce the alignment
of the struct to 4. The userspace has assertions to ensure this
works properly in all situations.

Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
2018-03-19 11:41:40 -06:00
..
asm-generic unify {de,}mangle_poll(), get rid of kernel-side POLL... 2018-02-11 14:37:22 -08:00
drm drm/tegra: Changes for v4.16-rc1 2018-01-12 11:46:19 +10:00
linux Merge branch 'work.poll2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2018-02-11 13:57:19 -08:00
misc ocxl: Add AFU interrupt support 2018-01-24 11:42:58 +11:00
mtd License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00
rdma RDMA/bnxt: Fix structure layout for bnxt_re_pd_resp 2018-03-19 11:41:40 -06:00
scsi License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00
sound Merge remote-tracking branches 'asoc/topic/fsl', 'asoc/topic/fsl-ssi', 'asoc/topic/fsl_asrc' and 'asoc/topic/hdac_hdmi' into asoc-next 2018-01-18 11:55:56 +00:00
video License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00
xen License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00