[PATCH 0/2] Add UVERBS_ATTR_FLAGS_IN

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Jason Gunthorpe <jgg@xxxxxxxxxxxx>

This is just a little series to make the kabi specs language cleaner and
clearer.

We have several places that use flags, and they should all follow the same
basic rules for consistency:
- Must be validated, unsupported bits must cause EINVAL
- Must be passed inline as a u32 or u64, ie cannot get EFAULT
- Are always optional, missing flags means flag == 0
- Are always be stored in a u32 or u64 after fetching from userspace
- Are linked to an enum defining the bits located in a uapi header

The new specs attribute and the uverbs_get_flagsXX helper enforce most of
these rules.

Jason Gunthorpe (2):
  IB/uverbs: Move ib_access_flags and ib_read_counters_flags to uapi
  IB/uverbs: Add UVERBS_ATTR_FLAGS_IN to the specs language

 drivers/infiniband/core/uverbs_ioctl.c        | 51 +++++++++++++++++++
 .../core/uverbs_std_types_counters.c          | 10 ++--
 drivers/infiniband/core/uverbs_std_types_cq.c | 13 +++--
 drivers/infiniband/core/uverbs_std_types_mr.c | 10 ++--
 drivers/infiniband/hw/mlx5/devx.c             | 16 +++---
 drivers/infiniband/hw/mlx5/main.c             | 16 +++---
 include/rdma/ib_verbs.h                       | 23 ++++-----
 include/rdma/uverbs_ioctl.h                   | 17 +++++++
 include/uapi/rdma/ib_user_ioctl_verbs.h       | 16 ++++++
 9 files changed, 129 insertions(+), 43 deletions(-)

-- 
2.18.0

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux