From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 6HZlJ59K/2IwXwEAbAwnHQ (envelope-from ) for ; Fri, 19 Aug 2022 10:32:31 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id GOFSJ59K/2L1pwAAauVa8A (envelope-from ) for ; Fri, 19 Aug 2022 10:32:31 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 6F0CA22C11 for ; Fri, 19 Aug 2022 10:32:31 +0200 (CEST) Received: from localhost ([::1]:42536 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oOxQc-00015j-03 for larch@yhetil.org; Fri, 19 Aug 2022 04:32:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46632) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oOspe-0006D5-Mb for bug-guix@gnu.org; Thu, 18 Aug 2022 23:38:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39033) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oOspd-0004yl-RZ for bug-guix@gnu.org; Thu, 18 Aug 2022 23:38:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oOspd-0003Hw-N5; Thu, 18 Aug 2022 23:38:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#53005: cryptsetup-static aborts opening LUKS2 volume with Argon2i PBKDF References: <87v8yz1sae.fsf@simonsouth.net> In-Reply-To: <87v8yz1sae.fsf@simonsouth.net> Resent-From: angry rectangle Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 19 Aug 2022 03:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53005 X-GNU-PR-Package: guix X-GNU-PR-Keywords: patch To: 53005@debbugs.gnu.org Received: via spool by 53005-submit@debbugs.gnu.org id=B53005.166088027612629 (code B ref 53005); Fri, 19 Aug 2022 03:38:01 +0000 Received: (at 53005) by debbugs.gnu.org; 19 Aug 2022 03:37:56 +0000 Received: from localhost ([127.0.0.1]:57015 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOspX-0003Hd-RN for submit@debbugs.gnu.org; Thu, 18 Aug 2022 23:37:56 -0400 Received: from [37.120.193.124] (port=57474 helo=mail.cock.li) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOspS-0003HL-Gi for 53005@debbugs.gnu.org; Thu, 18 Aug 2022 23:37:55 -0400 User-agent: mu4e 1.8.7; emacs 28.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cock.li; s=mail; t=1660880263; bh=9jpZQ88zpLcwHY3C5T2x9JSCvggqvadnLkNkI4KwqIM=; h=From:To:Subject:Date:From; b=vs2soFWYg7BAezdmIFLrP86Q9ubddtGnOFg5FkAsY5RG4zFLWy971Ht3gbckCBT10 giudJTL4nYjo+HHF6SwP29vc9rGp0S6gbEnyPiHQDc2MI1AZpDx9zA+IQB5NV82OXp wwPEtHL5c5elGbNU/CqRgq6GFQykLOfsIFyM6bM9HtHHijLd1RYBC1bdVGerxSIjcd GwdxkLrXY2CuS07TTr2jeGzi3UTM+TDLRKGEegj3kyD23HEqGu13RgAtGhZRhayBi/ 6HOh1L/457YrUvFUacY6GZkf9F8KmaRAKZRD8EwRcqEnjq0I4cbIzWbceIJacEIgDR cNh+VqaEemK9w== From: angry rectangle Date: Thu, 18 Aug 2022 23:31:17 -0400 Message-ID: <87zgg0q4xq.fsf@cock.li> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Fri, 19 Aug 2022 04:32:16 -0400 X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1660897951; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=8Q7Bq5kttGgrZJominqLTQ/x0a/fqgf34rVv8+JhDmw=; b=ZVUsn75OWF4EehAgU7j33nNipVf2qvIn6lVDBXTYtxPzQTwR7F5SSoXXfolQAdcsUwXWlv jhfm9SCWmac9+ZpKILVdP1PMebSfuo5wxQrqRjSYRKehs+uIsYKwsQ/uHwK71uVFGpgYQN 7y3fowCuR1ndHTexMTT1Fkgi4Smek2/bDf90JxfdH/6xrUw1aARzwNfxWXkQpfnMgbm6sj B269wgxkYzjIvj8VwzmQKtObW3BmjzbEEEcQkqtW66/uDPVucaJHfn+WZA8tszHUJc75V9 z6/u7x6/bYqeZ+RXY6q3417H11vchuQYqTuks/7wYVI4qUlY4QFY/fwrMOqEMg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1660897951; a=rsa-sha256; cv=none; b=RI5Ed7V3tF0NCdGbU2Oqa9wCQs6ZVdmxd5oDQy2uNw8mmIyfVIzPu0eRut5XD8g6dbfJq/ QvgqDJEX+ReD/Jb1K0RWVQSo58cKR9ac79cfw4Wq3IL+5VPQWPKrCzrxVHyI3e7fOFMHRk izTiSxhiSpjZUvgwmXnnoXmG/eDg3wGD3ql1sGUv8yP6mq00lcG4WbljewU39JWXOxSZDH 903dKj5mpAkra4l2SU8Jr3VyoG2YHvENNR55VR8SXpXrVde/sUSm7wYESjKrpXy7Z0kTxr P+dddRFJsTspcG4N8YknJe6waZhplFIE34MVbjA7EhyxEBt/nYDuqdgTUogN+w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=cock.li header.s=mail header.b=vs2soFWY; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 0.35 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=cock.li header.s=mail header.b=vs2soFWY; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 6F0CA22C11 X-Spam-Score: 0.35 X-Migadu-Scanner: scn0.migadu.com X-TUID: 0B7DWz3xFz/U --=-=-= Content-Type: text/plain I too have been affected by this bug for a long time and hope it will be fixed one day. For end-users, attached is a drop-in workaround you can use to make guix utilize the old cryptsetup build. It's sloppy, but at least the system can boot again. Thanks for the research, Simon. --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=alt-luks-device-mapping.scm Content-Description: workaround ;; workaround for https://issues.guix.gnu.org/53005 ;; ;; How to use: ;; Run this code in your operating system config file. ;; Then replace `luks-device-mapping' with `alt-luks-device-mapping'. ;; ;; i may have forgotten some use-modules. use your brain if necessary. ;; to-do: it would be better to use package transformation procedures to fix cryptsetup from the current guix (use-modules (guix inferior) (guix channels) (srfi srfi-1)) (define channels (list (channel (name 'guix) (url "https://git.savannah.gnu.org/git/guix.git") (commit "0996fcc657593955845c2761d7eb0f656149fe11")))) (define inferior (inferior-for-channels channels)) (define old-cryptsetup-static (first (lookup-inferior-packages inferior "cryptsetup-static"))) (use-modules (gnu system uuid)) (use-modules (ice-9 match)) (use-modules (guix modules)) ;; copied from guix. ;; the whole point is to edit the `file-append' line. ;; (if i knew a way to modify gexp, this could simply modify the output of the old procedure.) (define (my-open-luks-device source targets) "Return a gexp that maps SOURCE to TARGET as a LUKS device, using 'cryptsetup'." (with-imported-modules (source-module-closure '((gnu build file-systems) (guix build utils))) ;; For mkdir-p (match targets ((target) #~(let ((source #$(if (uuid? source) (uuid-bytevector source) source))) ;; XXX: 'use-modules' should be at the top level. (use-modules (rnrs bytevectors) ;bytevector? ((gnu build file-systems) #:select (find-partition-by-luks-uuid system*/tty)) ((guix build utils) #:select (mkdir-p))) (mkdir-p "/run/cryptsetup/") (zero? (system*/tty #$(file-append old-cryptsetup-static "/sbin/cryptsetup") "open" "--type" "luks" (if (bytevector? source) (or (let loop ((tries-left 10)) (and (positive? tries-left) (or (find-partition-by-luks-uuid source) (begin (sleep 1) (loop (- tries-left 1)))))) (error "LUKS partition not found" source)) source) #$target))))))) (define alt-luks-device-mapping (mapped-device-kind (inherit luks-device-mapping) (open my-open-luks-device))) --=-=-=--