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]
Date:   Fri, 6 Dec 2019 08:54:35 +0800
From:   Ming Lei <ming.lei@...hat.com>
To:     Pavel Machek <pavel@...x.de>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-kernel@...r.kernel.org, stable@...r.kernel.org,
        Naresh Kamboju <naresh.kamboju@...aro.org>,
        Christoph Hellwig <hch@....de>, Faiz Abbas <faiz_abbas@...com>,
        linux-block@...r.kernel.org, Ulf Hansson <ulf.hansson@...aro.org>,
        Sasha Levin <sashal@...nel.org>
Subject: Re: [PATCH 4.19 240/321] mmc: core: align max segment size with
 logical block size

On Thu, Dec 05, 2019 at 11:22:47PM +0100, Pavel Machek wrote:
> Hi!
> 
> > From: Ming Lei <ming.lei@...hat.com>
> > 
> > [ Upstream commit c53336c8f5f29043fded57912cc06c24e12613d7 ]
> > 
> > Logical block size is the lowest possible block size that the storage
> > device can address. Max segment size is often related with controller's
> > DMA capability. And it is reasonable to align max segment size with
> > logical block size.
> 
> > SDHCI sets un-aligned max segment size, and causes ADMA error, so
> > fix it by aligning max segment size with logical block size.
> 
> If un-aligned max segment sizes are problem, should we add checks to
> prevent setting them?
> 
> At least these set unaligned problems; is that a problem?
> 
> drivers/block/nbd.c:	blk_queue_max_segment_size(disk->queue, UINT_MAX);
> drivers/block/virtio_blk.c:		blk_queue_max_segment_size(q, -1U);
> drivers/block/rbd.c:	blk_queue_max_segment_size(q, UINT_MAX);

In theory, all segment size should be aligned, however the above MAX
value just means the queue hasn't max segment size limit, so it won't
be applied actually.


Thanks,
Ming

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ