public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Keith Busch <kbusch@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>, Keith Busch <kbusch@meta.com>,
	linux-block@vger.kernel.org, martin.petersen@oracle.com,
	axboe@kernel.dk
Subject: Re: [RFC PATCH] blk-integrity: support arbitrary buffer alignment
Date: Wed, 5 Nov 2025 15:53:09 +0100	[thread overview]
Message-ID: <20251105145309.GA26042@lst.de> (raw)
In-Reply-To: <aQtiYd69E-3G_PC4@kbusch-mbp>

On Wed, Nov 05, 2025 at 07:42:41AM -0700, Keith Busch wrote:
> This generally does pass 'void *' to contiguous protection data. If the
> actual protection payload is spread across multiple segments, though, we
> don't have contiguous data, so we have to bounce it through something.
> Declaring the union on the stack provides this memory for that unusual
> case. If the bip segment is big enough, we point the 'void *' directly
> at it; if not, we point it to the temporary onstack allocation. Using
> a union ensures that it's definitely big enough for any checksum type.

The union contains pointers, which are always 8 bytes.  But I guess
I can see now how this didn't blow up, assuming this was only tested
on classic PI, as the tuples are just 8 bytes and you just used the
pointer as storage?  I.e. these aren't supposed to be pointers, but
values?


  parent reply	other threads:[~2025-11-05 14:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-04 22:40 [RFC PATCH] blk-integrity: support arbitrary buffer alignment Keith Busch
2025-11-05 14:15 ` Christoph Hellwig
2025-11-05 14:42   ` Keith Busch
2025-11-05 14:51     ` Keith Busch
2025-11-05 14:53     ` Christoph Hellwig [this message]
2025-11-05 16:28       ` Keith Busch

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=20251105145309.GA26042@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=kbusch@kernel.org \
    --cc=kbusch@meta.com \
    --cc=linux-block@vger.kernel.org \
    --cc=martin.petersen@oracle.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox