lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20180618172605.GA32003@ziepe.ca>
Date:   Mon, 18 Jun 2018 11:26:05 -0600
From:   Jason Gunthorpe <jgg@...pe.ca>
To:     willy@...radead.org
Cc:     hans.westgaard.ry@...cle.com, Doug Ledford <dledford@...hat.com>,
        linux-rdma@...r.kernel.org,
        HÃ¥kon Bugge <haakon.bugge@...cle.com>,
        Parav Pandit <parav@...lanox.com>,
        Jack Morgenstein <jackm@....mellanox.co.il>,
        Pravin Shedge <pravin.shedge4linux@...il.com>,
        linux-kernel@...r.kernel.org,
        Matthew Wilcox <mawilcox@...rosoft.com>
Subject: Re: [PATCH v3 2/2] IB/mad: Use IDR for agent IDs

On Wed, Jun 13, 2018 at 05:34:03AM -0700, willy@...radead.org wrote:
> Allocate agent IDs from a global IDR instead of an atomic variable.
> This eliminates the possibility of reusing an ID which is already in
> use after 4 billion registrations.  We limit the assigned ID to be less
> than 2^24 as the mlx4 driver uses the most significant byte of the agent
> ID to store the slave number.  Users unlucky enough to see a collision
> between agent numbers and slave numbers see messages like:
> 
>  mlx4_ib: egress mad has non-null tid msb:1 class:4 slave:0
> 
> and the MAD layer stops working.
> 
> We look up the agent under protection of the RCU lock, which means we
> have to free the agent using kfree_rcu, and only increment the reference
> counter if it is not 0.
> 
> Signed-off-by: Matthew Wilcox <mawilcox@...rosoft.com>
> Reported-by: Hans Westgaard Ry <hans.westgaard.ry@...cle.com>
> Acked-by: Jack Morgenstein <jackm@....mellanox.co.il>
> Tested-by: Jack Morgenstein <jackm@....mellanox.co.il>
> ---
>  drivers/infiniband/core/mad.c      | 83 ++++++++++++++++++------------
>  drivers/infiniband/core/mad_priv.h |  7 +--
>  2 files changed, 55 insertions(+), 35 deletions(-)

Applied to for-next, thanks everyone

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ