Re: [RFC 1/6] block: refuse a dma-buf bio that carries a crypto context

From
Christoph Hellwig <hch@lst.de>
Date
2026-11-06 10:41:25
Also in
linux-ext4, linux-fsdevel, linux-mm, linux-xfs, lkml, nvdimm
Reply to
Mengmeng Zhao, 2026-11-05
On Thu, Nov 05, 2026 at 02:58:42PM +0800, Mengmeng Zhao wrote:
quoted hunk ↗ jump to hunk
+	/* a dma-buf bio has no pages for integrity work or contents crypto */
 	if (unlikely(op_is_dmabuf(bio->bi_opf) &&
-		bdev_has_integrity_csum(bio->bi_bdev))) {
+	    (bdev_has_integrity_csum(bio->bi_bdev) ||
+	     bio_has_crypt_ctx(bio)))) {
This could really use a factored helper explaining all the refusals.
And maybe we should use the chance to sit back and think what else
would blow up and add it there as well.
Thread (13 messages) 13 messages, 2 authors, last reply 5d ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help