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: <8694fd51-67a2-45e2-bda4-f6816e1d612c@oracle.com>
Date: Tue, 27 Aug 2024 08:19:35 +0100
From: John Garry <john.g.garry@...cle.com>
To: Li Wang <liwang@...hat.com>, linux-kernel@...r.kernel.org,
        ltp@...ts.linux.it
Cc: Jan Stancek <jstancek@...hat.com>, Damien Le Moal <dlemoal@...nel.org>,
        Stefan Hajnoczi <stefanha@...hat.com>, linux-block@...r.kernel.org,
        axboe@...nel.dk
Subject: Re: [PATCH] loop: Increase bsize variable from unsigned short to
 unsigned int

On 27/08/2024 04:22, Li Wang wrote:

+linux-block, Jens

> This change allows the loopback driver to handle larger block sizes

larger than what? PAGE_SIZE?

> and increases the consistency of data types used within the driver.
> Especially to mactch the struct queue_limits.logical_block_size type.
> 
> Also, this is to get rid of the LTP/ioctl_loop06 test failure:
> 
>    12 ioctl_loop06.c:76: TINFO: Using LOOP_SET_BLOCK_SIZE with arg > PAGE_SIZE
>    13 ioctl_loop06.c:59: TFAIL: Set block size succeed unexpectedly
>    ...
>    18 ioctl_loop06.c:76: TINFO: Using LOOP_CONFIGURE with block_size > PAGE_SIZE
>    19 ioctl_loop06.c:59: TFAIL: Set block size succeed unexpectedly
> 
> Link: https://urldefense.com/v3/__https://lists.linux.it/pipermail/ltp/2024-August/039912.html__;!!ACWV5N9M2RV99hQ!Kxyf0QaP903VtqbEb5n4dgWFhDjWex6vfZhJ9i2ewSqvAWf_iqFNNoOLlJm2BR_ofSSwGwowUQbky65jbg$
> Signed-off-by: Li Wang <liwang@...hat.com>
> Cc: Jan Stancek <jstancek@...hat.com>
> Cc: John Garry <john.g.garry@...cle.com>
> Cc: Damien Le Moal <dlemoal@...nel.org>
> Cc: Stefan Hajnoczi <stefanha@...hat.com>
> ---
>   drivers/block/loop.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/block/loop.c b/drivers/block/loop.c
> index 78a7bb28defe..86cc3b19faae 100644
> --- a/drivers/block/loop.c
> +++ b/drivers/block/loop.c
> @@ -173,7 +173,7 @@ static loff_t get_loop_size(struct loop_device *lo, struct file *file)
>   static bool lo_bdev_can_use_dio(struct loop_device *lo,
>   		struct block_device *backing_bdev)
>   {
> -	unsigned short sb_bsize = bdev_logical_block_size(backing_bdev);
> +	unsigned int sb_bsize = bdev_logical_block_size(backing_bdev);
>   
>   	if (queue_logical_block_size(lo->lo_queue) < sb_bsize)
>   		return false;
> @@ -977,7 +977,7 @@ loop_set_status_from_info(struct loop_device *lo,
>   	return 0;
>   }
>   
> -static unsigned short loop_default_blocksize(struct loop_device *lo,
> +static unsigned int loop_default_blocksize(struct loop_device *lo,
>   		struct block_device *backing_bdev)
>   {
>   	/* In case of direct I/O, match underlying block size */
> @@ -986,7 +986,7 @@ static unsigned short loop_default_blocksize(struct loop_device *lo,
>   	return SECTOR_SIZE;
>   }
>   
> -static int loop_reconfigure_limits(struct loop_device *lo, unsigned short bsize)
> +static int loop_reconfigure_limits(struct loop_device *lo, unsigned int bsize)
>   {
>   	struct file *file = lo->lo_backing_file;
>   	struct inode *inode = file->f_mapping->host;


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ