Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1o16tV-0005tW-4K for mharc-grub-devel@gnu.org; Tue, 14 Jun 2022 09:47:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42258) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o16tP-0005qf-5p for grub-devel@gnu.org; Tue, 14 Jun 2022 09:47:39 -0400 Received: from jpoiret.xyz ([206.189.101.64]:35038) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o16tM-0008Sn-Uc for grub-devel@gnu.org; Tue, 14 Jun 2022 09:47:38 -0400 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id A1A00184D3D; Tue, 14 Jun 2022 13:47:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1655214454; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=H7kMO+70qNQ46ossuog82AOVMtYC/V/XFrFXgdZ5xGQ=; b=D1v0DxNXyx6l+/JCNk/CRlrykplRQ56Xm9rdX5cMZvLAW3jIx6O0MwG+rb1pBa4tCT2ymu hu25zGcJmhkpVQXbtEdqsV8unJWnMW84XLIKAsyhQm5siV2pVLifeT5yezMWVBBrY4Ok2G 13DdJYfUfesySmcDQ8UiC/6R/V2UY/P0loMWZKv2pH3t1uftkqP4YzbkyNpRsV3bkSkv1i RIuzKEPlnsx+f2+88HLxnlfuJUmLr4CVDASu7EFNYGvcM57GpJI300XIjhhPv+k2vgs7hY 2G/heRI063OG+1TIXB89j4t7+5XisQxr19BP1UMWnbuFyxLZ8yauOhzfnpBVRg== From: Josselin Poiret To: Glenn Washburn Cc: grub-devel@gnu.org, Josselin Poiret Subject: [PATCH v4 0/2] Have LUKS2 cryptomounts be useable with grub-probe Date: Tue, 14 Jun 2022 15:47:28 +0200 Message-Id: <20220614134730.7439-1-dev@jpoiret.xyz> In-Reply-To: <20220520192035.313b5ede@crass-HP-ZBook-15-G2> References: <20220520192035.313b5ede@crass-HP-ZBook-15-G2> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Authentication-Results: jpoiret.xyz; auth=pass smtp.auth=jpoiret@jpoiret.xyz smtp.mailfrom=dev@jpoiret.xyz X-Spamd-Bar: ++++ 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.997, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: Tue, 14 Jun 2022 13:47:39 -0000 Hello Glenn, I took the time to rebase all the patches on the latest master, then remove the problematic parsing, keeping only the cipher part, as well as add some additional error checking for grub_cryptodisk_setcipher and grub_crypto_lookup_md_by_name. I also took note of another mail saying that we shouldn't pretend to support LUKS3 if it ever comes out, so I've modified the first patch to only recognize LUKS1 and LUKS2. With Fabian's patch [1] applied, this made grub-install install fine on a LUKS2 drive with a 4096 sector size. I hope all the logic errors were corrected (removing the complicated part should have helped). [1] 8075647.T7Z3S40VBb@linux-e202.suse.de (https://lists.gnu.org/archive/html/grub-devel/2022-06/msg00097.html) Best, 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 | 102 ++++++++++++++++++++++++++-- 1 file changed, 97 insertions(+), 5 deletions(-) -- 2.36.1