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  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:   Mon, 18 Oct 2021 19:49:01 +0200
From:   Christoph Hellwig <>
To:     Jens Axboe <>
Cc:     Christoph Hellwig <>, Coly Li <>,
        Mike Snitzer <>, Song Liu <>,
        David Sterba <>,
        Josef Bacik <>,
        Theodore Ts'o <>,
        OGAWA Hirofumi <>,
        Dave Kleikamp <>,
        Ryusuke Konishi <>,
        Anton Altaparmakov <>,
        Konstantin Komarov <>,
        Kees Cook <>,
        Phillip Lougher <>,
        Jan Kara <>,,,,,,,,,,,,,,,,,
Subject: Re: don't use ->bd_inode to access the block device size v3

On Mon, Oct 18, 2021 at 11:40:51AM -0600, Jens Axboe wrote:
>  static inline loff_t bdev_nr_bytes(struct block_device *bdev)
>  {
> -	return i_size_read(bdev->bd_inode);
> +	return bdev->bd_nr_sectors;

This hunk needs to go into bdev_nr_sectors, and the bdev_nr_bytes
probably wants to call bdev_nr_sectors and do the shifting.

Powered by blists - more mailing lists