All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabian Vogt <fvogt@suse.de>
To: grub-devel@gnu.org
Cc: Josselin Poiret <dev@jpoiret.xyz>,
	Glenn Washburn <development@efficientek.com>
Subject: Re: [PATCH v2 0/2] Have LUKS2 cryptomounts be useable with grub-probe
Date: Fri, 13 May 2022 13:58:16 +0200	[thread overview]
Message-ID: <4718904.GXAFRqVoOG@linux-e202.suse.de> (raw)
In-Reply-To: <20220512172038.3617643e@crass-HP-ZBook-15-G2>

Hi,

Am Freitag, 13. Mai 2022, 00:20:38 CEST schrieb Glenn Washburn:
> Hi Josselin,
> 
> Have this on my list of things to circle back to but it got pushed to
> the bottom. So sorry about taking so long. Thanks for the submitting
> this. This approach seems the most complete of the other patch series
> attempting to fix this issue and I'd like to get it merged in in some
> form.

As author of one of the other patch series implementing this, I also +1 any
approach which gets a real sector size through DM or the blockdev directly.
Hacking around an unknown sector size by treating it as 512 should be avoided,
especially as we have better approaches pending.

Thanks,
Fabian

> On Sat, 11 Dec 2021 13:29:43 +0100
> Josselin Poiret <dev@jpoiret.xyz> wrote:
> 
> > Glenn Washburn <development@efficientek.com> writes:
> > > Its not clear to me, did you test a LUKS2 device with sector size 4096
> > > with this change? I believe DM does use 512-byte sectors internally,
> > > but it can create block devices that report and use other sector sizes.
> > > You can verfiy this by creating a 4096 sector size LUKS2 devices, open
> > > it with cryptsetup, and then run "blockdev --getbsz /dev/mapper/<dm name>".
> > 
> > You're right, blockdev does indeed report 4096.  Here is an updated
> > patch that parses the optional sector_size argument from the DM
> > parameters, I have checked that it does indeed set the right
> > log_sector_size.  I think it worked without it because you can
> > technically just read with a lower sector size, but better be safe
> > than sorry!
> 
> Actually you can't read an encrypted LUKS devices with a lower sector
> size. Well, you can partially, but its like every nth sector. However,
> I don't think this code every needs to do the decryption itself anyway,
> which is the real reason a different sector size still works.
>
> Glenn
> 
> > Josselin Poiret (2):
> >   devmapper/getroot: Have devmapper recognize LUKS2
> >   devmapper/getroot: Set up cheated LUKS2 cryptodisk mount from DM
> >     parameters
> > 
> >  grub-core/osdep/devmapper/getroot.c | 107 ++++++++++++++++++++++++++--
> >  1 file changed, 102 insertions(+), 5 deletions(-)
> > 
> 
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
> 






      reply	other threads:[~2022-05-13 11:58 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-09 17:38 [PATCH 0/2] Have LUKS2 cryptomounts be useable with grub-probe Josselin Poiret
2021-12-09 17:38 ` [PATCH 1/2] devmapper/getroot: Have devmapper recognize LUKS2 Josselin Poiret
2021-12-09 17:38 ` [PATCH 2/2] devmapper/getroot: Set up cheated LUKS2 cryptodisk mount from DM parameters Josselin Poiret
2021-12-09 20:15 ` [PATCH 0/2] Have LUKS2 cryptomounts be useable with grub-probe Glenn Washburn
2021-12-11 12:29   ` [PATCH v2 " Josselin Poiret
2021-12-11 12:29     ` [PATCH v2 1/2] devmapper/getroot: Have devmapper recognize LUKS2 Josselin Poiret
2022-05-12 22:25       ` Glenn Washburn
2021-12-11 12:29     ` [PATCH v2 2/2] devmapper/getroot: Set up cheated LUKS2 cryptodisk mount from DM parameters Josselin Poiret
2022-05-12 22:38       ` Glenn Washburn
2022-05-20 18:20         ` [PATCH v3 0/2] Have LUKS2 cryptomounts be useable with grub-probe Josselin Poiret
2022-05-20 18:20           ` [PATCH v3 1/2] devmapper/getroot: Have devmapper recognize LUKS2 Josselin Poiret
2022-05-20 18:20           ` [PATCH v3 2/2] devmapper/getroot: Set up cheated LUKS2 cryptodisk mount from DM parameters Josselin Poiret
2022-05-21  0:20             ` Glenn Washburn
2022-05-21  9:27               ` Josselin Poiret
2022-06-14 13:47               ` [PATCH v4 0/2] Have LUKS2 cryptomounts be useable with grub-probe Josselin Poiret
2022-06-14 13:47                 ` [PATCH v4 1/2] devmapper/getroot: Have devmapper recognize LUKS2 Josselin Poiret
2022-06-14 13:47                 ` [PATCH v4 2/2] devmapper/getroot: Set up cheated LUKS2 cryptodisk mount from DM parameters Josselin Poiret
2022-06-14 18:28                   ` Glenn Washburn
2022-06-15  3:52                   ` Michael Chang
2022-06-14 18:31                 ` [PATCH v4 0/2] Have LUKS2 cryptomounts be useable with grub-probe Glenn Washburn
2022-06-15 10:01                   ` [PATCH v5 " Josselin Poiret
2022-06-15 10:02                     ` [PATCH v5 1/2] devmapper/getroot: Have devmapper recognize LUKS2 Josselin Poiret
2022-06-15 10:02                     ` [PATCH v5 2/2] devmapper/getroot: Set up cheated LUKS2 cryptodisk mount from DM parameters Josselin Poiret
2022-07-05 11:09                       ` Daniel Kiper
2022-07-08 10:06                         ` [PATCH v6 0/2] Have LUKS2 cryptomounts be useable with grub-probe Josselin Poiret
2022-07-08 10:06                           ` [PATCH v6 1/2] devmapper/getroot: Have devmapper recognize LUKS2 Josselin Poiret
2022-07-08 10:06                           ` [PATCH v6 2/2] devmapper/getroot: Set up cheated LUKS2 cryptodisk mount from DM parameters Josselin Poiret
2022-11-08 15:07                             ` Fabian Vogt
2022-08-11 18:18                           ` [PATCH v6 0/2] Have LUKS2 cryptomounts be useable with grub-probe Glenn Washburn
2022-05-12 22:20     ` [PATCH v2 " Glenn Washburn
2022-05-13 11:58       ` Fabian Vogt [this message]

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=4718904.GXAFRqVoOG@linux-e202.suse.de \
    --to=fvogt@suse.de \
    --cc=dev@jpoiret.xyz \
    --cc=development@efficientek.com \
    --cc=grub-devel@gnu.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.