All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@redhat.com>
To: Dmitry Baryshkov <dbaryshkov@gmail.com>
Cc: Dmitry Baryshkov <dmitry_baryshkov@mentor.com>,
	dm-devel@redhat.com, Alasdair Kergon <agk@redhat.com>
Subject: Re: dm-crypt: support using encrypted keys
Date: Tue, 21 Apr 2020 14:59:49 -0400	[thread overview]
Message-ID: <20200421185949.GA52939@lobo> (raw)
In-Reply-To: <CALT56yMxxCFX_j=A9YKysPcuBWs2a0iJbCXuE2q1iqy3irOxdA@mail.gmail.com>

On Tue, Apr 21 2020 at  2:32P -0400,
Dmitry Baryshkov <dbaryshkov@gmail.com> wrote:

> вт, 21 апр. 2020 г. в 21:27, Mike Snitzer <snitzer@redhat.com>:
> >
> > On Mon, Apr 20 2020 at  9:46P -0400,
> > Dmitry Baryshkov <dbaryshkov@gmail.com> wrote:
> >
> > > From: Dmitry Baryshkov <dmitry_baryshkov@mentor.com>
> > >
> > > Allow one to use encrypted in addition to user and login key types for
> > > device encryption.
> > >
> > > Signed-off-by: Dmitry Baryshkov <dmitry_baryshkov@mentor.com>
> >
> > I fixed up some issues, please see the following incremental patch,
> > I'll get this folded in and staged for 5.8.
> 
> Thank you!

Actually, I think this is needed too -- but please correct me if I'm wrong:

diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c
index a4c4afc67a3d..ba4d15476862 100644
--- a/drivers/md/dm-crypt.c
+++ b/drivers/md/dm-crypt.c
@@ -2235,8 +2235,9 @@ static int set_key_user(struct crypt_config *cc, struct key *key)
 
 static int set_key_encrypted(struct crypt_config *cc, struct key *key)
 {
-	struct encrypted_key_payload *ekp = key->payload.data[0];
+	const struct encrypted_key_payload *ekp;
 
+	ekp = dereference_key_locked(key);
 	if (!ekp)
 		return -EKEYREVOKED;
 


--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel

  reply	other threads:[~2020-04-21 18:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-20 13:46 [PATCH] dm-crypt: support using encrypted keys Dmitry Baryshkov
2020-04-21 18:27 ` Mike Snitzer
2020-04-21 18:32   ` Dmitry Baryshkov
2020-04-21 18:59     ` Mike Snitzer [this message]
2020-04-23 11:20       ` Dmitry Baryshkov
2020-04-22 16:47   ` Milan Broz
2020-04-22 21:40     ` Mike Snitzer
2020-04-23  6:47       ` Milan Broz
2020-04-23 11:02         ` Dmitry Baryshkov
2020-04-23 14:06         ` Mike Snitzer
2020-04-23 14:41           ` Milan Broz

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=20200421185949.GA52939@lobo \
    --to=snitzer@redhat.com \
    --cc=agk@redhat.com \
    --cc=dbaryshkov@gmail.com \
    --cc=dm-devel@redhat.com \
    --cc=dmitry_baryshkov@mentor.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.