> On Oct 28, 2019, at 12:03 PM, Michael van Elst <mlel...@serpens.de> wrote: > > So anything smaller as DEV_BSIZE will already fail at some other place, > validating it in bounds_check_with_label might even be the best place > for now, independent on wether it triggers a division by zero. Better > places could exist when all drivers would use common code, there are > still exceptions. Then you could validate the value once, and not > for every disk access.
Note that some (all? I forget...) HP-IB CS/80 drives use 256-byte sectors. But I believe it emulates DEV_BSIZE sectors for the benefit of the rest of the system. -- thorpej