linux/drivers/infiniband
Jason Gunthorpe 422e3d37ed RDMA/uverbs: Combine MIN_SZ_OR_ZERO with UVERBS_ATTR_STRUCT
After all the rework is done it is now possible to include single flags in
the type macros. Any user of UVERBS_ATTR_STRUCT needs to zero check data
past the end of the known struct to be correct, so make this mandatory,
and get rid of MIN_SZ_OR_ZERO as a user flag.

This changes UVERBS_ATTR_TYPE to refer to a struct of exact size with not
possibility of extension, convert the few users of UVERBS_ATTR_TYPE and
MIN_SZ_OR_ZERO to use UVERBS_ATTR_STRUCT.

The one user of UVERBS_ATTR_STRUCT without MIN_SZ_OR_ZERO is just
confused. There is some padding at the end of that struct, but userspace
always provides it with the padding. The construction doesn't test if the
padding is zero, so it is pointless. Just use UVERBS_ATTR_TYPE.

Finally, rename min_sz_or_zero to zero_trailing to better reflect what it
does and hopefully avoid such mis-uses in the future.

Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
2018-07-04 13:47:01 -06:00
..
core RDMA/uverbs: Combine MIN_SZ_OR_ZERO with UVERBS_ATTR_STRUCT 2018-07-04 13:47:01 -06:00
hw RDMA/uverbs: Use UVERBS_ATTR_MIN_SIZE correctly and uniformly 2018-07-04 13:47:01 -06:00
sw IB/rxe: don't clear the tx queue on every transfer 2018-06-29 12:26:13 -06:00
ulp ib_srpt: Fix a use-after-free in __srpt_close_all_ch() 2018-07-03 14:14:21 -06:00
Kconfig RDMA/ucm: Mark UCM interface as BROKEN 2018-05-24 09:39:25 -06:00
Makefile