All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Satya Tangirala <satyat@google.com>
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
	Jens Axboe <axboe@kernel.dk>, Eric Biggers <ebiggers@google.com>
Subject: Re: [PATCH 0/7] ensure bios aren't split in middle of crypto data unit
Date: Thu, 21 Jan 2021 17:11:29 +0000	[thread overview]
Message-ID: <20210121171129.GA4122715@infradead.org> (raw)
In-Reply-To: <20210114154723.2495814-1-satyat@google.com>

On Thu, Jan 14, 2021 at 03:47:16PM +0000, Satya Tangirala wrote:
> When a bio has an encryption context, its size must be aligned to its
> crypto data unit size. A bio must not be split in the middle of a data
> unit. Currently, bios are split at logical block boundaries, but a crypto
> data unit size might be larger than the logical block size - e.g. a machine
> could be using fscrypt (which uses 4K crypto data units) with an eMMC block
> device with inline encryption hardware that has a logical block size of
> 512 bytes. So we need to support cases where the data unit size is larger
> than the logical block size.

I think this model is rather broken.  Instead of creating an -EIO path
we can't handle anywhere make sure that the size limits exposed by the
driver that wants to split always align to the crypto data units to
avoid this issue to start with.

  parent reply	other threads:[~2021-01-21 17:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-14 15:47 [PATCH 0/7] ensure bios aren't split in middle of crypto data unit Satya Tangirala
2021-01-14 15:47 ` [PATCH 1/7] block: make blk_bio_segment_split() able to fail and return error Satya Tangirala
2021-01-14 15:47 ` [PATCH 2/7] block: blk-crypto: Introduce blk_crypto_bio_sectors_alignment() Satya Tangirala
2021-01-14 15:47 ` [PATCH 3/7] block: respect blk_crypto_bio_sectors_alignment() in bounce.c Satya Tangirala
2021-01-21 17:13   ` Christoph Hellwig
2021-01-14 15:47 ` [PATCH 4/7] block: respect blk_crypto_bio_sectors_alignment() in blk-crypto-fallback Satya Tangirala
2021-01-14 15:47 ` [PATCH 5/7] block: respect blk_crypto_bio_sectors_alignment() in blk-merge Satya Tangirala
2021-01-14 15:47 ` [PATCH 6/7] block: add WARN() in bio_split() for sector alignment Satya Tangirala
2021-01-14 15:47 ` [PATCH 7/7] block: compute nsegs more accurately in blk_bio_segment_split() Satya Tangirala
2021-01-21 17:11 ` Christoph Hellwig [this message]
2021-03-25 21:41   ` [PATCH 0/7] ensure bios aren't split in middle of crypto data unit Satya Tangirala

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210121171129.GA4122715@infradead.org \
    --to=hch@infradead.org \
    --cc=axboe@kernel.dk \
    --cc=ebiggers@google.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=satyat@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.