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] [thread-next>] [day] [month] [year] [list]
Message-ID: <849F6C89-EB21-4EAA-A1C0-1E4941B4812E@mellanox.com>
Date:   Tue, 28 May 2019 14:44:09 +0000
From:   Ariel Levkovich <lariel@...lanox.com>
To:     Leon Romanovsky <leon@...nel.org>,
        Michal Kubecek <mkubecek@...e.cz>
CC:     Doug Ledford <dledford@...hat.com>, Jason Gunthorpe <jgg@...pe.ca>,
        "linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mlx5: avoid 64-bit division


   On Mon, May 20, 2019 at 02:28:35PM +0300, Leon Romanovsky wrote:
    > > On Mon, May 20, 2019 at 01:19:02PM +0200, Michal Kubecek wrote:
    > > > Commit 25c13324d03d ("IB/mlx5: Add steering SW ICM device memory type")
    > > > breaks i386 build by introducing three 64-bit divisions. As the divisor
    > > > is MLX5_SW_ICM_BLOCK_SIZE() which is always a power of 2, we can replace
    > > > the division with bit operations.
    > >
    > > Interesting, we tried to solve it differently.
    > > I added it to our regression to be on the same side.
    
    > This patch works for us.
    
   Yes, this value is guaranteed to be a power of 2.  We safely use round_up() instead as suggested in the patch.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ