Thread (23 messages) 23 messages, 3 authors, 2020-03-19

Re: [PATCH v8 03/11] block: Make blk-integrity preclude hardware inline encryption

From: Christoph Hellwig <hch@infradead.org>
Date: 2020-03-19 11:04:57
Also in: linux-block, linux-f2fs-devel, linux-fscrypt, linux-fsdevel, linux-scsi

On Thu, Mar 12, 2020 at 01:02:45AM -0700, Satya Tangirala wrote:
There's no hardware currently that supports both integrity and inline
encryption. However, it seems possible that there will be in the near
future, based on discussion at
https://lore.kernel.org/r/20200108140730.GC2896@infradead.org/ (local)
But properly integrating both features is not trivial, and without
real hardware that implements both, it is difficult to tell if it will
be done correctly by the majority of hardware that support both, and
through discussions at
https://lore.kernel.org/r/20200224233459.GA30288@infradead.org/ (local)
it seems best not to support both features together right now, and
to decide what to do at probe time.
Please don't reference web links, just inline the important information.
quoted hunk ↗ jump to hunk
diff --git a/block/bio-integrity.c b/block/bio-integrity.c
index bf62c25cde8f..a5c57991c6fa 100644
--- a/block/bio-integrity.c
+++ b/block/bio-integrity.c
@@ -42,6 +42,11 @@ struct bio_integrity_payload *bio_integrity_alloc(struct bio *bio,
 	struct bio_set *bs = bio->bi_pool;
 	unsigned inline_vecs;
 
+	if (bio_has_crypt_ctx(bio)) {
+		pr_warn("blk-integrity can't be used together with inline en/decryption.");
+		return ERR_PTR(-EOPNOTSUPP);
+	}
This is a hard error and should just be a WARN_ON_ONCE.

I'm also not sure we need the register time warnings at all.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help