IB/uverbs: Add PTR_IN attributes that are allocated/copied automatically
authorMatan Barak <matanb@mellanox.com>
Sun, 17 Jun 2018 09:59:52 +0000 (12:59 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Tue, 19 Jun 2018 16:53:02 +0000 (10:53 -0600)
commit8762d149e88dea5bc09e0d7faa84b635807167ab
tree59191bef4b90fae122ac4741b2cbe05779a60585
parent9442d8bf1d63e09780dc3b60ac6cdfa0813a98c2
IB/uverbs: Add PTR_IN attributes that are allocated/copied automatically

Adding UVERBS_ATTR_SPEC_F_ALLOC_AND_COPY flag to PTR_IN attributes.
By using this flag, the parse automatically allocates and copies the
user-space data. This data is accessible by using uverbs_attr_get_len
and uverbs_attr_get_alloced_ptr inline accessor functions from the
handler.

Signed-off-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/uverbs_ioctl.c
include/rdma/uverbs_ioctl.h