All of lore.kernel.org
 help / color / mirror / Atom feed
From: Coiby Xu <coxu@redhat.com>
To: Eric Biggers <ebiggers@kernel.org>, Milan Broz <gmazyland@gmail.com>
Cc: kexec@lists.infradead.org, Baoquan He <bhe@redhat.com>,
	x86@kernel.org,  dm-devel@redhat.com,
	Pingfan Liu <kernelfans@gmail.com>,
	linux-kernel@vger.kernel.org,
	 Dave Hansen <dave.hansen@intel.com>,
	Kairui Song <ryncsn@gmail.com>,
	 Jan Pazdziora <jpazdziora@redhat.com>,
	Thomas Staudt <tstaudt@de.ibm.com>,
	 Vitaly Kuznetsov <vkuznets@redhat.com>,
	Dave Young <dyoung@redhat.com>
Subject: Re: [PATCH 0/5] Support kdump with LUKS encryption by reusing LUKS volume key
Date: Mon, 5 Jun 2023 10:31:49 +0800	[thread overview]
Message-ID: <36mz3gn764ceadfbuhhmoo2zaiqmzplpkdcnszha2hzhmb3i62@sm6hilxryzk4> (raw)
In-Reply-To: <f569a35a-bff9-9dbb-2ded-7e02ee060a9a@gmail.com>

Hi Eric and Milan,

On Sat, Jun 03, 2023 at 11:22:52AM +0200, Milan Broz wrote:
>On 6/2/23 23:34, Eric Biggers wrote:
>>On Thu, Jun 01, 2023 at 03:24:39PM +0800, Coiby Xu wrote:
>>>[PATCH 0/5] Support kdump with LUKS encryption by reusing LUKS volume key
>>
>>The kernel has no concept of LUKS at all.  It provides dm-crypt, which LUKS
>>happens to use.  But LUKS is a userspace concept.
>>
>>This is a kernel patchset, so why does it make sense for it to be talking about
>>LUKS at all?  Perhaps you mean dm-crypt?
>
>Exactly.

Thanks for raising the above concern! The use cases like CoreOS and
Confidential VMs explicitly want kdump to work for LUKS. And correct me
if I'm wrong, I think the two problems addressed by this patch set only
apply to LUKS so the kdump part of the kernel only cares about the LUKS
case. If there are use cases where similar approach is needed, I'll be
happy to make the solution more generic.

>
>I had the same comment almost a year ago... and it still applies:
>https://lore.kernel.org/all/c857dcf8-024e-ab8a-fd26-295ce2e0ae41@gmail.com/
>
> Anyway, please fix the naming before this patchset can be read or reviewed!
>
> LUKS is user-space key management only (on-disk metadata); the kernel has
> no idea how the key is derived or what LUKS is - dm-crypt only knows the key
> (either through keyring or directly in the mapping table).
>
> Polluting kernel namespace with "luks" names variables is wrong - dm-crypt
> is used in many other mappings (plain, bitlocker, veracrypt, ...)
> Just use the dm-crypt key, do not reference LUKS at all.

Thanks for the reminding! That comment was on the first RFC version. But
starting with "RFC v2", there is no longer any interaction with dm-crypt
(to save a copy of the LUKS volume key for the kdump kernel) and now I
make cryptsetup talks to the kdump part of the kernel via the sysfs to
reuse the volume key. So only the kdump part of the kernel needs to know
LUKS which is what it cares. Thus I don't think there is any kernel
namespace pollution now.

>
>Milan
>

-- 
Best regards,
Coiby


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

WARNING: multiple messages have this Message-ID (diff)
From: Coiby Xu <coxu@redhat.com>
To: Eric Biggers <ebiggers@kernel.org>, Milan Broz <gmazyland@gmail.com>
Cc: kexec@lists.infradead.org, Baoquan He <bhe@redhat.com>,
	x86@kernel.org, dm-devel@redhat.com,
	Pingfan Liu <kernelfans@gmail.com>,
	linux-kernel@vger.kernel.org, Dave Hansen <dave.hansen@intel.com>,
	Kairui Song <ryncsn@gmail.com>,
	Jan Pazdziora <jpazdziora@redhat.com>,
	Thomas Staudt <tstaudt@de.ibm.com>,
	Vitaly Kuznetsov <vkuznets@redhat.com>,
	Dave Young <dyoung@redhat.com>
Subject: Re: [PATCH 0/5] Support kdump with LUKS encryption by reusing LUKS volume key
Date: Mon, 5 Jun 2023 10:31:49 +0800	[thread overview]
Message-ID: <36mz3gn764ceadfbuhhmoo2zaiqmzplpkdcnszha2hzhmb3i62@sm6hilxryzk4> (raw)
In-Reply-To: <f569a35a-bff9-9dbb-2ded-7e02ee060a9a@gmail.com>

Hi Eric and Milan,

On Sat, Jun 03, 2023 at 11:22:52AM +0200, Milan Broz wrote:
>On 6/2/23 23:34, Eric Biggers wrote:
>>On Thu, Jun 01, 2023 at 03:24:39PM +0800, Coiby Xu wrote:
>>>[PATCH 0/5] Support kdump with LUKS encryption by reusing LUKS volume key
>>
>>The kernel has no concept of LUKS at all.  It provides dm-crypt, which LUKS
>>happens to use.  But LUKS is a userspace concept.
>>
>>This is a kernel patchset, so why does it make sense for it to be talking about
>>LUKS at all?  Perhaps you mean dm-crypt?
>
>Exactly.

Thanks for raising the above concern! The use cases like CoreOS and
Confidential VMs explicitly want kdump to work for LUKS. And correct me
if I'm wrong, I think the two problems addressed by this patch set only
apply to LUKS so the kdump part of the kernel only cares about the LUKS
case. If there are use cases where similar approach is needed, I'll be
happy to make the solution more generic.

>
>I had the same comment almost a year ago... and it still applies:
>https://lore.kernel.org/all/c857dcf8-024e-ab8a-fd26-295ce2e0ae41@gmail.com/
>
> Anyway, please fix the naming before this patchset can be read or reviewed!
>
> LUKS is user-space key management only (on-disk metadata); the kernel has
> no idea how the key is derived or what LUKS is - dm-crypt only knows the key
> (either through keyring or directly in the mapping table).
>
> Polluting kernel namespace with "luks" names variables is wrong - dm-crypt
> is used in many other mappings (plain, bitlocker, veracrypt, ...)
> Just use the dm-crypt key, do not reference LUKS at all.

Thanks for the reminding! That comment was on the first RFC version. But
starting with "RFC v2", there is no longer any interaction with dm-crypt
(to save a copy of the LUKS volume key for the kdump kernel) and now I
make cryptsetup talks to the kdump part of the kernel via the sysfs to
reuse the volume key. So only the kdump part of the kernel needs to know
LUKS which is what it cares. Thus I don't think there is any kernel
namespace pollution now.

>
>Milan
>

-- 
Best regards,
Coiby


WARNING: multiple messages have this Message-ID (diff)
From: Coiby Xu <coxu@redhat.com>
To: Eric Biggers <ebiggers@kernel.org>, Milan Broz <gmazyland@gmail.com>
Cc: Baoquan He <bhe@redhat.com>, Kairui Song <ryncsn@gmail.com>,
	x86@kernel.org, kexec@lists.infradead.org,
	linux-kernel@vger.kernel.org, Pingfan Liu <kernelfans@gmail.com>,
	Dave Hansen <dave.hansen@intel.com>,
	dm-devel@redhat.com, Jan Pazdziora <jpazdziora@redhat.com>,
	Thomas Staudt <tstaudt@de.ibm.com>,
	Vitaly Kuznetsov <vkuznets@redhat.com>,
	Dave Young <dyoung@redhat.com>
Subject: Re: [dm-devel] [PATCH 0/5] Support kdump with LUKS encryption by reusing LUKS volume key
Date: Mon, 5 Jun 2023 10:31:49 +0800	[thread overview]
Message-ID: <36mz3gn764ceadfbuhhmoo2zaiqmzplpkdcnszha2hzhmb3i62@sm6hilxryzk4> (raw)
In-Reply-To: <f569a35a-bff9-9dbb-2ded-7e02ee060a9a@gmail.com>

Hi Eric and Milan,

On Sat, Jun 03, 2023 at 11:22:52AM +0200, Milan Broz wrote:
>On 6/2/23 23:34, Eric Biggers wrote:
>>On Thu, Jun 01, 2023 at 03:24:39PM +0800, Coiby Xu wrote:
>>>[PATCH 0/5] Support kdump with LUKS encryption by reusing LUKS volume key
>>
>>The kernel has no concept of LUKS at all.  It provides dm-crypt, which LUKS
>>happens to use.  But LUKS is a userspace concept.
>>
>>This is a kernel patchset, so why does it make sense for it to be talking about
>>LUKS at all?  Perhaps you mean dm-crypt?
>
>Exactly.

Thanks for raising the above concern! The use cases like CoreOS and
Confidential VMs explicitly want kdump to work for LUKS. And correct me
if I'm wrong, I think the two problems addressed by this patch set only
apply to LUKS so the kdump part of the kernel only cares about the LUKS
case. If there are use cases where similar approach is needed, I'll be
happy to make the solution more generic.

>
>I had the same comment almost a year ago... and it still applies:
>https://lore.kernel.org/all/c857dcf8-024e-ab8a-fd26-295ce2e0ae41@gmail.com/
>
> Anyway, please fix the naming before this patchset can be read or reviewed!
>
> LUKS is user-space key management only (on-disk metadata); the kernel has
> no idea how the key is derived or what LUKS is - dm-crypt only knows the key
> (either through keyring or directly in the mapping table).
>
> Polluting kernel namespace with "luks" names variables is wrong - dm-crypt
> is used in many other mappings (plain, bitlocker, veracrypt, ...)
> Just use the dm-crypt key, do not reference LUKS at all.

Thanks for the reminding! That comment was on the first RFC version. But
starting with "RFC v2", there is no longer any interaction with dm-crypt
(to save a copy of the LUKS volume key for the kdump kernel) and now I
make cryptsetup talks to the kdump part of the kernel via the sysfs to
reuse the volume key. So only the kdump part of the kernel needs to know
LUKS which is what it cares. Thus I don't think there is any kernel
namespace pollution now.

>
>Milan
>

-- 
Best regards,
Coiby

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


  reply	other threads:[~2023-06-05  2:36 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-01  7:24 [PATCH 0/5] Support kdump with LUKS encryption by reusing LUKS volume key Coiby Xu
2023-06-01  7:24 ` [dm-devel] " Coiby Xu
2023-06-01  7:24 ` Coiby Xu
2023-06-01  7:24 ` [PATCH 1/5] kexec_file: allow to place kexec_buf randomly Coiby Xu
2023-06-01  7:24   ` [dm-devel] " Coiby Xu
2023-06-01  7:24   ` Coiby Xu
2023-06-01  7:24 ` [PATCH 2/5] crash_dump: save the LUKS volume key temporarily Coiby Xu
2023-06-01  7:24   ` [dm-devel] " Coiby Xu
2023-06-01  7:24   ` Coiby Xu
2023-06-01  7:24 ` [PATCH 3/5] crash_dump: retrieve LUKS volume key in kdump kernel Coiby Xu
2023-06-01  7:24   ` [dm-devel] " Coiby Xu
2023-06-01  7:24   ` Coiby Xu
2023-06-01  7:24 ` [PATCH 4/5] x86/crash: pass the LUKS volume key to " Coiby Xu
2023-06-01  7:24   ` [dm-devel] " Coiby Xu
2023-06-01  7:24   ` Coiby Xu
2023-06-01  7:24 ` [PATCH 5/5] x86/crash: make the page that stores the LUKS volume key inaccessible Coiby Xu
2023-06-01  7:24   ` [dm-devel] " Coiby Xu
2023-06-01  7:24   ` Coiby Xu
2023-06-02 21:34 ` [PATCH 0/5] Support kdump with LUKS encryption by reusing LUKS volume key Eric Biggers
2023-06-02 21:34   ` Eric Biggers
2023-06-02 21:34   ` [dm-devel] " Eric Biggers
2023-06-03  9:22   ` Milan Broz
2023-06-03  9:22     ` Milan Broz
2023-06-03  9:22     ` Milan Broz
2023-06-05  2:31     ` Coiby Xu [this message]
2023-06-05  2:31       ` [dm-devel] " Coiby Xu
2023-06-05  2:31       ` Coiby Xu
2023-06-05  7:09       ` Milan Broz
2023-06-05  7:09         ` Milan Broz
2023-06-05  7:09         ` [dm-devel] " Milan Broz
2023-06-06 11:02         ` Coiby Xu
2023-06-06 11:02           ` [dm-devel] " Coiby Xu
2023-06-06 11:02           ` Coiby Xu
2023-06-07  6:14           ` Milan Broz
2023-06-07  6:14             ` Milan Broz
2023-06-07  6:14             ` [dm-devel] " Milan Broz
2023-06-07 12:39             ` Coiby Xu
2023-06-07 12:39               ` [dm-devel] " Coiby Xu
2023-06-07 12:39               ` Coiby Xu
2023-06-08 10:39               ` Milan Broz
2023-06-08 10:39                 ` Milan Broz
2023-06-08 10:39                 ` [dm-devel] " Milan Broz
2023-06-09  9:58                 ` Coiby Xu
2023-06-09  9:58                   ` [dm-devel] " Coiby Xu
2023-06-09  9:58                   ` Coiby Xu

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=36mz3gn764ceadfbuhhmoo2zaiqmzplpkdcnszha2hzhmb3i62@sm6hilxryzk4 \
    --to=coxu@redhat.com \
    --cc=bhe@redhat.com \
    --cc=dave.hansen@intel.com \
    --cc=dm-devel@redhat.com \
    --cc=dyoung@redhat.com \
    --cc=ebiggers@kernel.org \
    --cc=gmazyland@gmail.com \
    --cc=jpazdziora@redhat.com \
    --cc=kernelfans@gmail.com \
    --cc=kexec@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ryncsn@gmail.com \
    --cc=tstaudt@de.ibm.com \
    --cc=vkuznets@redhat.com \
    --cc=x86@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 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.