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: <CAHckoCwMz2Tqo4ZVkXAmAqfvY1APhqSHDkdS6OPXaqzOMUTh_w@mail.gmail.com>
Date:   Wed, 13 Jan 2021 10:42:53 +0800
From:   Li Feng <fengli@...rtx.com>
To:     "Martin K. Petersen" <martin.petersen@...cle.com>
Cc:     Johannes Thumshirn <Johannes.Thumshirn@....com>,
        Feng Li <lifeng1519@...il.com>, Jens Axboe <axboe@...nel.dk>,
        "open list:BLOCK LAYER" <linux-block@...r.kernel.org>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] blk: avoid divide-by-zero with zero granularity

Yes, Reject the device is the right fix. I will try to send another fix.
By the way, I think this fix is good protection, maybe some other devices
violate this block size constraint.

Divide zero is unacceptable.

Thanks,
Feng Li

Martin K. Petersen <martin.petersen@...cle.com> 于2021年1月13日周三 上午1:48写道:
>
>
> Johannes,
>
> >> I use the nvme-tcp as the host, the target is spdk nvme-tcp target,
> >> and set a wrong block size(i.g. bs=8), then the host prints this oops:
> >
> > I think the better fix here is to reject devices which report a block size
> > small than a sector.
>
> Yep, Linux doesn't support logical block sizes < 512 bytes.
>
> Also, the NVMe spec states:
>
>         "A value smaller than 9 (i.e., 512 bytes) is not supported."
>
> --
> Martin K. Petersen      Oracle Linux Engineering

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ