From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1npTwG-0000eD-AD for mharc-grub-devel@gnu.org; Fri, 13 May 2022 07:58:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49888) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1npTw7-0000PU-Nv for grub-devel@gnu.org; Fri, 13 May 2022 07:58:24 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:35846) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1npTw4-0002AV-IE for grub-devel@gnu.org; Fri, 13 May 2022 07:58:23 -0400 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id F1C7A21AFD; Fri, 13 May 2022 11:58:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1652443096; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rl0kC6IOvHpghW0lhazgzQIm5CY/9+2acW/8TSpZXFI=; b=zD8mxSHr6NnhMV5HIMaTlsT1t5EqbhR9vkRiUbIO00gp2sQtDLM2GJ3we1bu1onjC7zjwV CH40vctip2rMfIw0O9gt9mxH59J4fOHXUutRED2BHcDdDnqzovJ8OcpGvvxKOnwuuJ6zrO S62QFGsmWcPhkitHAVAcnz3MrdD1Fwk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1652443096; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rl0kC6IOvHpghW0lhazgzQIm5CY/9+2acW/8TSpZXFI=; b=1RoaMAGwopo5oP4fkee2IM/AGIh6FCYu9jqGeGfrrow/USA7Pi/J1KqpP4Z2Yh7OfNVjE1 kuS2ksRa8hHBrOBw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id E357813A84; Fri, 13 May 2022 11:58:16 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id Qon5NthHfmKhRgAAMHmgww (envelope-from ); Fri, 13 May 2022 11:58:16 +0000 From: Fabian Vogt To: grub-devel@gnu.org Cc: Josselin Poiret , Glenn Washburn Subject: Re: [PATCH v2 0/2] Have LUKS2 cryptomounts be useable with grub-probe Date: Fri, 13 May 2022 13:58:16 +0200 Message-ID: <4718904.GXAFRqVoOG@linux-e202.suse.de> In-Reply-To: <20220512172038.3617643e@crass-HP-ZBook-15-G2> References: <20211209141526.002e83a4@crass-HP-ZBook-15-G2> <20211211122945.6326-1-dev@jpoiret.xyz> <20220512172038.3617643e@crass-HP-ZBook-15-G2> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Received-SPF: pass client-ip=195.135.220.28; envelope-from=fvogt@suse.de; helo=smtp-out1.suse.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 May 2022 11:58:24 -0000 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 wrote: > > > Glenn Washburn 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/". > > > > 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 >