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: <6a4eb76e-a203-4be1-9816-09c25b76db4b@kernel.org>
Date: Wed, 18 Jun 2025 12:26:47 +0200
From: Daniel Gomez <da.gomez@...nel.org>
To: Pankaj Raghav <p.raghav@...sung.com>,
 Alexander Viro <viro@...iv.linux.org.uk>, Jan Kara <jack@...e.cz>,
 Christian Brauner <brauner@...nel.org>
Cc: kernel@...kajraghav.com, linux-fsdevel@...r.kernel.org,
 linux-kernel@...r.kernel.org,
 "Martin K . Petersen" <martin.petersen@...cle.com>
Subject: Re: [PATCH v2] fs/buffer: remove comment about hard sectorsize

On 18/06/2025 09.58, Pankaj Raghav wrote:
> Commit e1defc4ff0cf ("block: Do away with the notion of hardsect_size")
> changed hardsect_size to logical block size. The comment on top still
> says hardsect_size.
> 
> Remove the comment as the code is pretty clear. While we are at it,
> format the relevant code.
> 
> Reviewed-by: Martin K. Petersen <martin.petersen@...cle.com>
> Signed-off-by: Pankaj Raghav <p.raghav@...sung.com>
> ---
>  fs/buffer.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/fs/buffer.c b/fs/buffer.c
> index 8cf4a1dc481e..a14d281c6a74 100644
> --- a/fs/buffer.c
> +++ b/fs/buffer.c
> @@ -1122,9 +1122,8 @@ __getblk_slow(struct block_device *bdev, sector_t block,
>  {
>  	bool blocking = gfpflags_allow_blocking(gfp);
>  
> -	/* Size must be multiple of hard sectorsize */
> -	if (unlikely(size & (bdev_logical_block_size(bdev)-1) ||
> -			(size < 512 || size > PAGE_SIZE))) {
> +	if (unlikely(size & (bdev_logical_block_size(bdev) - 1) ||
> +		     (size < 512 || size > PAGE_SIZE))) {

Nit: Would it make sense to use SECTOR_SIZE here instead of the hard-coded 512?

>  		printk(KERN_ERR "getblk(): invalid block size %d requested\n",
>  					size);
>  		printk(KERN_ERR "logical block size: %d\n",
> 
> base-commit: e04c78d86a9699d136910cfc0bdcf01087e3267e

Reviewed-by: Daniel Gomez <da.gomez@...sung.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ