Re: [PATCH v3 2/2] RDMA/netlink: Audit policy settings for netlink attributes

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

 



On Fri, Jun 21, 2019 at 05:00:44PM -0400, Doug Ledford wrote:
> 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@xxxxxxxxxx>
> ---
>  drivers/infiniband/core/nldev.c  | 25 ++++++++++++-------------
>  include/rdma/rdma_netlink.h      |  6 ++++++
>  include/uapi/rdma/rdma_netlink.h |  4 ----
>  3 files changed, 18 insertions(+), 17 deletions(-)

Applied to for-next, thanks

Jason




[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