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: <ZU3Pf0o2RCZ+dGNa@infradead.org>
Date:   Thu, 9 Nov 2023 22:36:47 -0800
From:   Christoph Hellwig <hch@...radead.org>
To:     ed.tsai@...iatek.com
Cc:     ming.lei@...hat.com, hch@....de, Jens Axboe <axboe@...nel.dk>,
        Matthias Brugger <matthias.bgg@...il.com>,
        AngeloGioacchino Del Regno 
        <angelogioacchino.delregno@...labora.com>,
        wsd_upstream@...iatek.com, chun-hung.wu@...iatek.com,
        casper.li@...iatek.com, will.shiu@...iatek.com,
        light.hsieh@...iatek.com, linux-block@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-mediatek@...ts.infradead.org
Subject: Re: [PATCH v2] block: limit the extract size to align queue limit

On Fri, Nov 10, 2023 at 01:19:49PM +0800, ed.tsai@...iatek.com wrote:
> +	if (bdev && blk_queue_pci_p2pdma(bdev->bd_disk->queue))
>  		extraction_flags |= ITER_ALLOW_P2PDMA;

As pointed out in reply to Ming, you really need to first figure out
if we can assume we have a valid bdev or not, and if not pass all the
relevant information separately.

> +	if (bdev && bio_op(bio) != REQ_OP_ZONE_APPEND) {
> +		unsigned int max = queue_max_bytes(bdev_get_queue(bdev));

The higher level code must not look at queue_max_bytes, that is only
used for splitting and might not even be initialized.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ