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: <CAEemH2co6g0TCcj7vtG49yq8qhUfjJ83iCRBD6qiwVqGEG9=SA@mail.gmail.com>
Date: Tue, 27 Aug 2024 19:59:16 +0800
From: Li Wang <liwang@...hat.com>
To: John Garry <john.g.garry@...cle.com>
Cc: linux-kernel@...r.kernel.org, linux-block@...r.kernel.org, axboe@...nel.dk, 
	ltp@...ts.linux.it, Stefan Hajnoczi <stefanha@...hat.com>, 
	Damien Le Moal <dlemoal@...nel.org>, Jan Stancek <jstancek@...hat.com>
Subject: Re: [PATCh v2] loop: Increase bsize variable from unsigned short to
 unsigned int

On Tue, Aug 27, 2024 at 4:41 PM John Garry <john.g.garry@...cle.com> wrote:
>
> On 27/08/2024 09:17, Li Wang wrote:
> > This change allows the loopback driver to handle block size larger than
> > PAGE_SIZE and increases the consistency of data types used within the driver.
> > Especially to match 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
> >
> > Thoese fail due to the loop_reconfigure_limits() cast bsize to 'unsined short'
>
> these
>
> > that never gets an expected error when testing invalid logical block size,
> > which was just exposed since 6.11-rc1 introduced patches:
> >
> >    commit 9423c653fe61 ("loop: Don't bother validating blocksize")
> >    commit fe3d508ba95b ("block: Validate logical block size in blk_validate_limits()")
>
> Maybe it's better to add a fixes tag for original commit which
> introduced unsigned short usage.

I'm not sure that makes sense because at that moment loop_set_block_size
has a dedicated function blk_validate_block_size to validate bsize, after your
commit 9423c653fe61 optimize that then the problem appears.

  473516b36193 ("loop: use the atomic queue limits update API")


> Reviewed-by: John Garry <john.g.garry@...cle.com>

Thanks for reviewing.


-- 
Regards,
Li Wang


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ