Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1n06BP-0006NQ-Se for mharc-grub-devel@gnu.org; Wed, 22 Dec 2021 13:17:48 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35650) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n06BL-0006KE-EG for grub-devel@gnu.org; Wed, 22 Dec 2021 13:17:43 -0500 Received: from jpoiret.xyz ([206.189.101.64]:47122) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n06BJ-0006OZ-FW for grub-devel@gnu.org; Wed, 22 Dec 2021 13:17:42 -0500 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id 2CF79184D40; Wed, 22 Dec 2021 18:17:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1640197058; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=bSG0cYvtuMUT6bGFPtHErLy9vVa2Xw+1/AR+zmHstxk=; b=BVt3x/a/1z5Ksu8VhSIgEdActz66SzzFEejbRPua8/ijSMRPWLG+5SU8orlda3AY8aeI9P 5uAJAjOCRJLVgZcLl5N0+/OfBSMe8JwIeViAnRP6pPRowKr5tLJiFSifgiRtn5DT2et1YY j+pxMOA4hSUA4hT5HoAoF0WvfEiwZQjaMn4Huk/3ZZNQ8V+VRYf0CgkUA2JyKYBBcQ1K7W yw3YPMPGOWCPqdQMcdUMrLdp8W5kGNzJ97FYqfgpqYKr2RdhcRkFoXMnveN04+/qPBkGfF C4fK21F1HOnvNt5ZLLhU9/ZhoOHbB/ZZ0cjrj64dLpmBJiqVE37cKhVdYGRviA== From: Josselin Poiret To: Fabian Vogt , The development of GNU GRUB , Patrick Steinhardt Cc: Michael Chang Subject: Re: [PATCH 3/4] luks2: set up dummy sector size during scan In-Reply-To: <43151052.QDiU1Cuimh@linux-e202.suse.de> References: <20210806045110.GA4099@mercury> <43151052.QDiU1Cuimh@linux-e202.suse.de> Date: Wed, 22 Dec 2021 19:17:37 +0100 Message-ID: <8735mkbj26.fsf@jpoiret.xyz> MIME-Version: 1.0 Content-Type: text/plain X-Spamd-Bar: / Authentication-Results: jpoiret.xyz; auth=pass smtp.auth=jpoiret@jpoiret.xyz smtp.mailfrom=dev@jpoiret.xyz Received-SPF: pass client-ip=206.189.101.64; envelope-from=dev@jpoiret.xyz; helo=jpoiret.xyz X-Spam_score_int: 4 X-Spam_score: 0.4 X-Spam_bar: / X-Spam_report: (0.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, FROM_SUSPICIOUS_NTLD=0.499, PDS_OTHER_BAD_TLD=1.999, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no 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: Wed, 22 Dec 2021 18:17:45 -0000 Hello everyone, Fabian Vogt 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. > > 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`. 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? -- Josselin Poiret