mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Linlin Zhang <linlin.zhang@oss.qualcomm.com>
Cc: Mikulas Patocka <mpatocka@redhat.com>,
	Milan Broz <gmazyland@gmail.com>,
	Alasdair Kergon <agk@redhat.com>,
	Mike Snitzer <snitzer@kernel.org>,
	Benjamin Marzinski <bmarzins@redhat.com>,
	Neeraj Soni <neeraj.soni@oss.qualcomm.com>,
	dm-devel@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/1] dm-inlinecrypt: add support for hardware-wrapped keys
Date: Sat, 20 Jun 2026 14:27:13 -0700	[thread overview]
Message-ID: <20260620212713.GB1702@quark> (raw)
In-Reply-To: <20260525121348.1321282-2-linlin.zhang@oss.qualcomm.com>

On Mon, May 25, 2026 at 05:13:48AM -0700, Linlin Zhang wrote:
> @@ -502,8 +520,9 @@ static void inlinecrypt_status(struct dm_target *ti, status_type_t type,
>  		 * the returned table.  Userspace is responsible for redacting
>  		 * the key when needed.
>  		 */
> -		DMEMIT("%s %*phN %llu %s %llu", ctx->cipher_string,
> -		       ctx->key.size, ctx->key.bytes, ctx->iv_offset,
> +		DMEMIT("%s %*phN %u %llu %s %llu", ctx->cipher_string,
> +		       ctx->key.size, ctx->key.bytes,
> +		       ctx->key_type, ctx->iv_offset,
>  		       ctx->dev->name, ctx->start);

I think you forgot to update this when adding support for keyring keys.
The point of the keyring keys (to the extent they have a point at all)
is that their contents can't be read back from userspace.  But this just
returns the contents.  Take a look at how dm-crypt.c handles this.

- Eric

  reply	other threads:[~2026-06-20 21:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-25 12:13 [PATCH v3 0/1] " Linlin Zhang
2026-05-25 12:13 ` [PATCH v3 1/1] " Linlin Zhang
2026-06-20 21:27   ` Eric Biggers [this message]
2026-06-15  5:39 ` [PATCH v3 0/1] " Linlin Zhang
2026-06-15  8:34   ` Mikulas Patocka

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=20260620212713.GB1702@quark \
    --to=ebiggers@kernel.org \
    --cc=agk@redhat.com \
    --cc=bmarzins@redhat.com \
    --cc=dm-devel@lists.linux.dev \
    --cc=gmazyland@gmail.com \
    --cc=linlin.zhang@oss.qualcomm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpatocka@redhat.com \
    --cc=neeraj.soni@oss.qualcomm.com \
    --cc=snitzer@kernel.org \
    /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

all inboxes | Powered by JetHome®