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]
Date:   Wed, 8 Sep 2021 08:45:10 -0300
From:   Jason Gunthorpe <jgg@...dia.com>
To:     Niklas Schnelle <schnelle@...ux.ibm.com>
Cc:     Leon Romanovsky <leon@...nel.org>,
        Doug Ledford <dledford@...hat.com>, linux-rdma@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH RESEND 1/2] RDMA/mlx5: Fix number of allocated XLT entries

On Wed, Sep 08, 2021 at 10:18:48AM +0200, Niklas Schnelle wrote:
> In commit 8010d74b9965b ("RDMA/mlx5: Split the WR setup out of
> mlx5_ib_update_xlt()") the allocation logic was split out of
> mlx5_ib_update_xlt() and the logic was changed to enable better OOM
> handling. Sadly this change introduced a miscalculation of the number of
> entries that were actually allocated when under memory pressure where it
> can actually become 0 which on s390 lets dma_map_single() fail.
> 
> It can also lead to corruption of the free pages list when the wrong
> number of entries is used in the calculation of sg->length which is used
> as argument for free_pages().
> 
> Fix this by using the allocation size instead of misusing
> get_order(size).
> 
> Cc: stable@...r.kernel.org
> Fixes: 8010d74b9965b ("RDMA/mlx5: Split the WR setup out of mlx5_ib_update_xlt()")
> Signed-off-by: Niklas Schnelle <schnelle@...ux.ibm.com>
> ---
>  drivers/infiniband/hw/mlx5/mr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Both patches applied to for-rc, thanks

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ