From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1pG6da-0000vk-Fd for mharc-grub-devel@gnu.org; Thu, 12 Jan 2023 18:05:35 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pG6dX-0000vS-7R for grub-devel@gnu.org; Thu, 12 Jan 2023 18:05:31 -0500 Received: from mail-yw1-x112e.google.com ([2607:f8b0:4864:20::112e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pG6dV-00054O-AB for grub-devel@gnu.org; Thu, 12 Jan 2023 18:05:30 -0500 Received: by mail-yw1-x112e.google.com with SMTP id 00721157ae682-4bf16baa865so260718807b3.13 for ; Thu, 12 Jan 2023 15:05:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficientek-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=J6C0mk7p2cyCXJdTnZC5dDFPg1dsLreSF6exZMEFz3w=; b=xfusrFmc+SoUszoAemiCUTZJKj13fDhN88moI3TRIqsbU9vRpUixRIelp0JPzwBy1W q8tpR2b74hjEfLGsYClYP0kSBlosOav/y45KF3wN6DtUKAwdwoZ78xD/6z9PajFuaCDu Zx0HgroggvArWVbQFID5P0C+3OMcJPmiPIOyqpTELQMT1MQmgWm2pC4NQJw4htS0TCc8 6naaa8pHoAuKdi3iEHosSfWMgOJBUYXyGsXdu32RlHFSceo8FpgRAEwmLCO0v7m5bhKB rqLgulI2WiwxmLfbc+FVYGLQbFPNsLFw/oz/0bQbm2Q7qJpvNRLxf+EaVhe7AT2lbhcn EnBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=J6C0mk7p2cyCXJdTnZC5dDFPg1dsLreSF6exZMEFz3w=; b=chYXuKfoOtepbNvnvnqMREgF2Ud9yDlW+9sh2n7dNpNDiTShBv6iiguQH74Y5ONMUR RVYQOz7LnqixSfOY8KR7HZzGNCr66YT7uaapaRc/kbkKZZit1tjb3awL3Hy2Ym2GQOHE Hu1nTNIFCbAu+RII7lxNOeS7SA9xG1xXO2nQ9nBQ0SJTP5g+iamY0yzl64MGkP3c0pS0 t4qlwzZ23VgIWjy6e3pePY3rRhJ7WVINnHYWf6rcPgmLt03aSimFS2Vyt75Xl19gRIl7 KcjiVv3ZYlBCaO3WPWm/CB+UrzRf/+dAmPLhpvAjyM5PMl7BbwRiimujvANqZCCMbSI8 wAaw== X-Gm-Message-State: AFqh2kpP/rPyUd4DkvNef02QyeWmqY9HDsbVfiHfgNJZMAg5/Xanrw2d VTyg0/vB/3rJRfEEd9IzOChhmhWIR3crRQio X-Google-Smtp-Source: AMrXdXtkEsVZqRrtbVMa/bavh8ySpgiPY9WPTeItXMYborKaXDNGr8WGLhk3YXAVeoM+K8xhC6VQDw== X-Received: by 2002:a05:690c:f0d:b0:4db:5cc9:d599 with SMTP id dc13-20020a05690c0f0d00b004db5cc9d599mr3555284ywb.14.1673564727319; Thu, 12 Jan 2023 15:05:27 -0800 (PST) Received: from crass-HP-ZBook-15-G2.lan ([37.218.244.251]) by smtp.gmail.com with ESMTPSA id bq35-20020a05620a46a300b00704c9015e68sm11704446qkb.116.2023.01.12.15.05.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Jan 2023 15:05:26 -0800 (PST) From: Glenn Washburn To: grub-devel@gnu.org, Daniel Kiper Cc: Patrick Steinhardt , Pierre-Louis Bonicoli , Josselin Poiret , Fabian Vogt , Glenn Washburn Subject: [PATCH 0/4] LUKS1/2 testing in fs-tester and LUKS2 support in grub-probe Date: Thu, 12 Jan 2023 17:05:06 -0600 Message-Id: <20230112230510.1319896-1-development@efficientek.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::112e; envelope-from=development@efficientek.com; helo=mail-yw1-x112e.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: Thu, 12 Jan 2023 23:05:31 -0000 This series adds the testing of LUKS 1 and 2 encrypted container to the user-space fs tester. While this does replicate some of the testing done by grub_cmd_cryptomount, and is less flexible, it is run natively (that is without need for virtualization). It also tests the added LUKS2 support in grub-probe, unlike grub_cmd_cryptomount which does not test any user-space grub components. All of these patches have previously been sent to the list. Only patch 4 has been slightly modified to fix some issues. Since utility of any one is greatly enhanced, and in the case of patch 4 required, by the others, I think it makes sense to evaluate them together. Fabian has noted a memory leak with error handling when using LUKS2 with a null_cipher[1]. Since this isn't something that I expect to happen in the wild (why would you use an unencrypted LUKS container?) and even if it does occur grub-probe is exiting, so the leak would be very short lived, I don't think this is something that we need to worry about. It wouldn't be that hard to fix though, just annoying and add a little more complexity to the source. The corresponding patches can be found in the order of this series here: 1: [PATCH v3] disk/cryptodisk: When cheatmounting, use the sector info of the cheat device https://lists.gnu.org/archive/html/grub-devel/2022-06/msg00106.html 2: [PATCH v6 1/2] devmapper/getroot: Have devmapper recognize LUKS2 https://lists.gnu.org/archive/html/grub-devel/2022-07/msg00036.html 3: [PATCH v6 2/2] devmapper/getroot: Set up cheated LUKS2 cryptodisk mount from DM parameters https://lists.gnu.org/archive/html/grub-devel/2022-07/msg00038.html 4: [PATCH v4] grub-fs-tester: Add luks1 and luks2 support https://lists.gnu.org/archive/html/grub-devel/2022-06/msg00127.html Glenn [1] https://lists.gnu.org/archive/html/grub-devel/2022-11/msg00032.html Fabian Vogt (1): disk/cryptodisk: When cheatmounting, use the sector info of the cheat device Josselin Poiret (2): devmapper/getroot: Have devmapper recognize LUKS2 devmapper/getroot: Set up cheated LUKS2 cryptodisk mount from DM parameters Pierre-Louis Bonicoli (1): grub-fs-tester: Add luks1 and luks2 support .gitignore | 2 + Makefile.util.def | 12 +++ grub-core/disk/cryptodisk.c | 20 ++++- grub-core/osdep/devmapper/getroot.c | 118 ++++++++++++++++++++++++++-- tests/luks1_test.in | 23 ++++++ tests/luks2_test.in | 23 ++++++ tests/util/grub-fs-tester.in | 57 +++++++++++++- 7 files changed, 246 insertions(+), 9 deletions(-) create mode 100644 tests/luks1_test.in create mode 100644 tests/luks2_test.in -- 2.34.1