From: Fabian Vogt <fvogt@suse.de>
To: The development of GNU GRUB <grub-devel@gnu.org>,
Patrick Steinhardt <ps@pks.im>
Cc: Josselin Poiret <dev@jpoiret.xyz>,
Michael Chang <mchang@suse.com>,
Josselin Poiret via Grub-devel <grub-devel@gnu.org>,
Pierre-Louis Bonicoli <pierre-louis.bonicoli@libregerbil.fr>
Subject: Re: [PATCH 3/4] luks2: set up dummy sector size during scan
Date: Fri, 04 Feb 2022 16:46:48 +0100 [thread overview]
Message-ID: <2946843.ILLGAiG1oY@linux-e202.suse.de> (raw)
In-Reply-To: <8735mkbj26.fsf@jpoiret.xyz>
Hi,
Am Mittwoch, 22. Dezember 2021, 19:17:37 CET schrieb Josselin Poiret via Grub-devel:
> Hello everyone,
>
> Fabian Vogt <fvogt@suse.de> writes:
> > It looks like we have a third patch (series) for this feature meanwhile:
> > [PATCH 0/2] Have LUKS2 cryptomounts be useable with grub-probe
> >
> > I CC'd the author, let's try to coordinate.
And there's a forth one now (author CC'd)!
("[PATCH 3/3] grub-core/kern/disk.c: handle LUKS2 devices")
So we have:
"[PATCH 3/4] luks2: set up dummy sector size during scan", which hardcodes 512,
"[PATCH 1/2] disk/cryptodisk: When cheatmounting, use the sector info of the
cheat device", which queries the sector size of the underlying host device,
"[PATCH v2 2/2] devmapper/getroot: Set up cheated LUKS2 cryptodisk mount from
DM parameters", which parses the DM table to get the sector_size, and now
"[PATCH 3/3] grub-core/kern/disk.c: handle LUKS2 devices", which changes the
grub core code to accept a sector size of 0 for LUKS2 devices.
Should be enough options to pick a good one ;-)
> > Thanks,
> > Fabian
>
> Let me just say that I had not found this patch series while searching
> beforehand. Let me just recap what my patches do differently (in
> relation to patches 3 and 4 of this series):
>
> Because cheat-mounting cryptodisks only happens (from my understanding)
> when pulling devmapper devices, we can simply ask the kernel for the dm
> and dm-crypt parameters that it's opened with, and populate our
> cheat-mounted device from that. This completely circumvents the multiple
> segments issue, as this will always yield the parameters corresponding
> to the user-specified mountpoint of `grub-probe` or `grub-install`.
Yup.
Did you have a look at my approach? That effectively does the same, but using a
single ioctl instead of anything complex with DM directly.
> I also opted not to add a GRUB_DEV_ABSTRACTION_LUKS2 abstraction, so as
> to reuse all existing code that supports LUKS1, although that can be
> confusing. We could simply rename GRUB_DEV_ABSTRACTION_LUKS1 to
> GRUB_DEV_ABSTRACTION_CRYTODISK, as LUKS1 and LUKS2 only differ in how
> they're unlocked, not in underlying algorithms.
>
> What do you think?
Sounds good to me, though I'd count that as a separate refactoring step for
the future.
Cheers,
Fabian
next prev parent reply other threads:[~2022-02-04 15:47 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-30 12:25 [PATCH 0/4] Probing support for LUKS2 Patrick Steinhardt
2020-05-30 12:25 ` [PATCH 1/4] luks: fix out-of-bounds copy of UUID Patrick Steinhardt
2020-06-06 23:32 ` Petr Vorel
2020-05-30 12:25 ` [PATCH 2/4] luks2: strip dashes off of the UUID Patrick Steinhardt
2020-09-15 14:30 ` Daniel Kiper
2020-05-30 12:25 ` [PATCH 3/4] luks2: set up dummy sector size during scan Patrick Steinhardt
2021-08-06 4:51 ` Michael Chang
2021-08-08 14:20 ` Patrick Steinhardt
2021-12-16 15:52 ` Fabian Vogt
2021-12-22 18:17 ` Josselin Poiret
2022-02-04 15:46 ` Fabian Vogt [this message]
2022-02-07 13:15 ` Josselin Poiret
2022-05-21 0:13 ` Glenn Washburn
2022-05-21 10:53 ` Fabian Vogt
2022-06-13 14:29 ` [PATCH v2] disk/cryptodisk: When cheatmounting, use the sector info of the cheat device Fabian Vogt
2022-06-14 2:19 ` Glenn Washburn
2022-06-14 13:55 ` [PATCH v3] " Fabian Vogt
2022-06-14 18:18 ` Glenn Washburn
2022-06-21 15:40 ` Patrick Steinhardt
2022-08-11 18:22 ` Glenn Washburn
2020-05-30 12:25 ` [PATCH 4/4] osdep: detect LUKS2-encrypted devices Patrick Steinhardt
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=2946843.ILLGAiG1oY@linux-e202.suse.de \
--to=fvogt@suse.de \
--cc=dev@jpoiret.xyz \
--cc=grub-devel@gnu.org \
--cc=mchang@suse.com \
--cc=pierre-louis.bonicoli@libregerbil.fr \
--cc=ps@pks.im \
/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.