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]
Date:   Wed, 28 Jun 2023 17:46:34 +0100
From:   Matthew Wilcox <willy@...radead.org>
To:     Yangtao Li <frank.li@...o.com>
Cc:     axboe@...nel.dk, song@...nel.org, viro@...iv.linux.org.uk,
        brauner@...nel.org, xiang@...nel.org, chao@...nel.org,
        huyue2@...lpad.com, jefflexu@...ux.alibaba.com, hch@...radead.org,
        djwong@...nel.org, linux-block@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-raid@...r.kernel.org,
        linux-fsdevel@...r.kernel.org, linux-erofs@...ts.ozlabs.org,
        linux-xfs@...r.kernel.org
Subject: Re: [PATCH 1/7] block: add queue_logical_block_mask() and
 bdev_logical_block_mask()

On Wed, Jun 28, 2023 at 05:34:54PM +0800, Yangtao Li wrote:
> Introduce queue_logical_block_mask() and bdev_logical_block_mask()
> to simplify code, which replace (queue_logical_block_size(q) - 1)
> and (bdev_logical_block_size(bdev) - 1).

The thing is that I know what queue_logical_block_size - 1 does.
That's the low bits.  _Which_ bits are queue_logical_block_mask?
The high bits or the low bits?  And before you say "It's obviously",
we have both ways round in the kernel today.

I am not in favour of this change.  I might be in favour of bool
queue_logical_block_aligned(q, x), but even then it doesn't seem worth
the bits.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ