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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CY4PR04MB37515103AF92B1BB196ED494E7780@CY4PR04MB3751.namprd04.prod.outlook.com>
Date:   Tue, 21 Jul 2020 11:17:01 +0000
From:   Damien Le Moal <Damien.LeMoal@....com>
To:     Maxim Levitsky <mlevitsk@...hat.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC:     Keith Busch <kbusch@...nel.org>,
        Josef Bacik <josef@...icpanda.com>,
        "open list:BLOCK LAYER" <linux-block@...r.kernel.org>,
        Sagi Grimberg <sagi@...mberg.me>, Jens Axboe <axboe@...nel.dk>,
        "open list:NVM EXPRESS DRIVER" <linux-nvme@...ts.infradead.org>,
        "open list:SCSI CDROM DRIVER" <linux-scsi@...r.kernel.org>,
        Tejun Heo <tj@...nel.org>,
        Bart Van Assche <bvanassche@....org>,
        "Martin K. Petersen" <martin.petersen@...cle.com>,
        Jason Wang <jasowang@...hat.com>,
        Maxim Levitsky <maximlevitsky@...il.com>,
        Stefan Hajnoczi <stefanha@...hat.com>,
        Colin Ian King <colin.king@...onical.com>,
        "Michael S. Tsirkin" <mst@...hat.com>,
        Paolo Bonzini <pbonzini@...hat.com>,
        Ulf Hansson <ulf.hansson@...aro.org>,
        Ajay Joshi <Ajay.Joshi@....com>,
        Ming Lei <ming.lei@...hat.com>,
        "open list:SONY MEMORYSTICK SUBSYSTEM" <linux-mmc@...r.kernel.org>,
        Christoph Hellwig <hch@....de>,
        Satya Tangirala <satyat@...gle.com>,
        "open list:NETWORK BLOCK DEVICE (NBD)" <nbd@...er.debian.org>,
        Hou Tao <houtao1@...wei.com>, Jens Axboe <axboe@...com>,
        "open list:VIRTIO CORE AND NET DRIVERS" 
        <virtualization@...ts.linux-foundation.org>,
        "James E.J. Bottomley" <jejb@...ux.ibm.com>,
        Alex Dubov <oakad@...oo.com>
Subject: Re: [PATCH 06/10] block: ms_block: use
 blk_is_valid_logical_block_size

On 2020/07/21 19:54, Maxim Levitsky wrote:
> Signed-off-by: Maxim Levitsky <mlevitsk@...hat.com>
> ---
>  drivers/memstick/core/ms_block.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/memstick/core/ms_block.c b/drivers/memstick/core/ms_block.c
> index d9ee8e3dc72da..e4df03e10fb46 100644
> --- a/drivers/memstick/core/ms_block.c
> +++ b/drivers/memstick/core/ms_block.c
> @@ -1727,7 +1727,7 @@ static int msb_init_card(struct memstick_dev *card)
>  	msb->pages_in_block = boot_block->attr.block_size * 2;
>  	msb->block_size = msb->page_size * msb->pages_in_block;
>  
> -	if (msb->page_size > PAGE_SIZE) {
> +	if (!(blk_is_valid_logical_block_size(msb->page_size))) {
>  		/* this isn't supported by linux at all, anyway*/
>  		dbg("device page %d size isn't supported", msb->page_size);
>  		return -EINVAL;
> 

Looks good to me.

Reviewed-by: Damien Le Moal <damien.lemoal@....com>

-- 
Damien Le Moal
Western Digital Research

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ