aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/rdma
diff options
context:
space:
mode:
authorDoug Ledford <dledford@redhat.com>2019-06-21 17:00:44 -0400
committerJason Gunthorpe <jgg@mellanox.com>2019-06-25 16:26:54 -0300
commit34d65cd837d0c77fac0c0da632c616030b2927e3 (patch)
tree6f6fce7a3ca546a087090a6fcd84b9f3e8a4a7e7 /include/uapi/rdma
parentRDMA/hns: Cleanup unnecessary exported symbols (diff)
downloadlinux-dev-34d65cd837d0c77fac0c0da632c616030b2927e3.tar.xz
linux-dev-34d65cd837d0c77fac0c0da632c616030b2927e3.zip
RDMA/netlink: Audit policy settings for netlink attributes
For all string attributes for which we don't currently accept the element as input, we only use it as output, set the string length to RDMA_NLDEV_ATTR_EMPTY_STRING which is defined as 1. That way we will only accept a null string for that element. This will prevent someone from writing a new input routine that uses the element without also updating the policy to have a valid value. Also while there, make sure the existing entries that are valid have the correct policy, if not, correct the policy. Remove unnecessary checks for nla_strlcpy() overflow once the policy has been set correctly. Signed-off-by: Doug Ledford <dledford@redhat.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'include/uapi/rdma')
-rw-r--r--include/uapi/rdma/rdma_netlink.h4
1 files changed, 0 insertions, 4 deletions
diff --git a/include/uapi/rdma/rdma_netlink.h b/include/uapi/rdma/rdma_netlink.h
index b27c02185dcc..650cee8c4bf1 100644
--- a/include/uapi/rdma/rdma_netlink.h
+++ b/include/uapi/rdma/rdma_netlink.h
@@ -284,10 +284,6 @@ enum rdma_nldev_command {
RDMA_NLDEV_NUM_OPS
};
-enum {
- RDMA_NLDEV_ATTR_ENTRY_STRLEN = 16,
-};
-
enum rdma_nldev_print_type {
RDMA_NLDEV_PRINT_TYPE_UNSPEC,
RDMA_NLDEV_PRINT_TYPE_HEX,