From patchwork Mon Jul 15 13:46:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Koch X-Patchwork-Id: 13733560 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 58830C3DA59 for ; Mon, 15 Jul 2024 13:46:38 +0000 (UTC) Received: from EUR03-DBA-obe.outbound.protection.outlook.com (EUR03-DBA-obe.outbound.protection.outlook.com [40.107.104.73]) by mx.groups.io with SMTP id smtpd.web11.38326.1721051196428950637 for ; Mon, 15 Jul 2024 06:46:37 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@siemens.com header.s=selector2 header.b=Ur5pCfgM; spf=pass (domain: siemens.com, ip: 40.107.104.73, mailfrom: stefan-koch@siemens.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=sWdzBVecWs+KQ/oWrld6yR6cC68ZLxCEeJeahIwZIW0MJvza1G4fEwdp+w+1BP2aa3ey4r7YYUUUqf/VNQFS9sEdyZsHiBhCmrscd0BXKJz587bxHHmkFsajTRjOsz1PTtV73ieWvrHxl95vA/n/lcTPvF5IBmN2VCcQ1EXXMtaIXqTnpNzB7rDlHYaMB/NQo/JwXdSa6WNP9I0+UJlVwaYeuaJv1YePl6/DZbYn4IWttmZu5nvGbtMkpdPgBt7XPa5pjAc9zB/sAtUa97Wy85WwNoaqpa85guI9pwAB9FZyln7yUeI6gAghdn8Rz4MxLcAeXzzTBHGcqP1TsNnl8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=k2HS2yeK4UxUP8QZvBXkhssTVQTrl5h0dl2AL/cTsaE=; b=uacRlz5hylmPtnyE1yQk9At17PErFdvMCshDeQeEcDi4zmh0RUjcm9A04RPSjoXBvjlIcOs27pykzlQYMftfpI4cpFj2gwlROQFIC+pj9x9WgDrjcc+Bd5NRYAGWuKE0YpO92EtmLQIlB+rgvqoVhOJB2EZSpdMZf4cS9eS3Z9FGQxJDXmtnxNA1cGfRf1zxSGBqEKs4tA6zPbp6ngGwX19seiLD1u4C1PMfw3Nl9/xauOXBfy5RjZLZRgzjCsxSdZXeFq0WDvKzTFQwSuw8nZV+8jVE3DhDeQOSqL+eqSUfQItXuOMD4MX3Ih0mZgrxcXLxhhZdKCmeK+EcFNwu1Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=siemens.com; dmarc=pass action=none header.from=siemens.com; dkim=pass header.d=siemens.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=siemens.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=k2HS2yeK4UxUP8QZvBXkhssTVQTrl5h0dl2AL/cTsaE=; b=Ur5pCfgMo2tjja5iUOwrsCifYErWzVA6m+kDQEcRQGA0QtAMH07YVTdsyKs8N0NFOIm6aynv1Ng2fiub173UHTZY4ihb77zpxTplLQouhHneceARfjPp7VsUo8e4ssNLr1rlvXuDRzt1peVjnL0CnZA85NuRAzJv+ETNbA89iPZc4Prith0S6JW8RyOJNbog5I0YKjbcWCL5lncUup6NPgeU18vl4iF+SQkbeD6cjDLw4285ckiziKluDqS1f1nU9AseKDqcQ/3jFoplul1q+/Drjv0uBvqGWaQ+yj9z0uiolVOTIwnnU+1+0Ijw3D86fm/v+GU367KR7IamjXPk/A== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=siemens.com; Received: from DB9PR10MB4953.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:2c2::14) by DB5PR10MB7871.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:48a::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.28; Mon, 15 Jul 2024 13:46:35 +0000 Received: from DB9PR10MB4953.EURPRD10.PROD.OUTLOOK.COM ([fe80::f75d:ad6e:d321:cc46]) by DB9PR10MB4953.EURPRD10.PROD.OUTLOOK.COM ([fe80::f75d:ad6e:d321:cc46%4]) with mapi id 15.20.7762.020; Mon, 15 Jul 2024 13:46:34 +0000 From: Stefan Koch To: cip-dev@lists.cip-project.org CC: jan.kiszka@siemens.com, quirin.gylstorff@siemens.com, christian.storm@siemens.com, michael.adler@siemens.com, simon.sudler@siemens.com, stefan-koch@siemens.com Subject: [PATCH v3 2/4] initramfs-crypt-hook: Provide full losetup executable Date: Mon, 15 Jul 2024 15:46:28 +0200 Message-ID: <20240715134630.1640160-2-stefan-koch@siemens.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240715134630.1640160-1-stefan-koch@siemens.com> References: <20240715134630.1640160-1-stefan-koch@siemens.com> X-ClientProxiedBy: FR0P281CA0046.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:48::23) To DB9PR10MB4953.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:2c2::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB9PR10MB4953:EE_|DB5PR10MB7871:EE_ X-MS-Office365-Filtering-Correlation-Id: 349a7b6a-a68f-4f5a-dd29-08dca4d48aa4 X-MS-Exchange-AtpMessageProperties: SA X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|366016; X-Microsoft-Antispam-Message-Info: 8AaJFvB1lFKMWCdul+9AEY6uhD7VhXLDDvu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ubAjx//p2KW2CBV+DEa8896Ol5Kv33FxXD20kZRXBIKd7Sh2lwPluVqE/AEab8T7nomcK0XtPOiZwZHpOesq+DNwAVAkG9zQmpBrgYPOrlWixIVTSThFOK1ZJLcV+TxZW5ScOdwAoHZ5SQgZ2ZHotOd2XyEF/Cxb6SNh+GLA93eYWXaoQ1gwEu0Z5i8SujC5iy45DKgOfg/JoaVcvGL3b83Vxhl3KhYiA1R8yrKr1TvWdtKOqYIlqGA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB9PR10MB4953.EURPRD10.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(376014)(366016);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: PseQpGngzQKWU5Fy54IWaFblU73nX8XGB7GmR5p9wsgUkcP39dxsN1XY7dfh8wtMDxPBPJX2Imi5YDljXz0pL9QA84xbSrCuirjz4T+xkm8KsTsdU+xwKHsTxmYKrQYPEWk43IR14V8lIn8/4MrJgjeEATiQjPYLwffAjjf3PrNaJmFlVTQK8La/XkbdfCayVui8Wem7drBm6bmpiSD0XMI9V/4gmg+IholfA7c2UugPtkBAr5NHD/49rt6vGu+6DOkguxpcENPa5WcgW6Taxoq9iI8Avg+5uLLwCQdGpysfoUQtrNEmuwf2UsQDrjaeooO0Wp94AsLiAvR8WzIIZ2krvhzQ8YOpVC2hrFMuE3s/dXGq1F2m4W0V5iT3EW58d+MZe86rIyd0u3VnByN6N6Dua7tVx/dUsrUu4EII8qneKKlzSFqdtTmkrIo6BJI3jeMfxDNrFlFsIk7A/kPDz4pF5yzTKo29qbHSMVS7A83sDy7sOathxwnhs2uqbESsvNwqJUxGz72W7EmqIbY5xAvctBWcCuplvUEWPgLTSRL5juLhNYf0mu2xxUU7ntjC3BxcL7NA8bh0c2XWttgqod+6/G+hurkHtcHKu3OkEoILB2vOypwNm7n9ZKDiPJBLdheTfuS0GIFcoUlsaGE0yYWdW+tfg0hbDn/J8OrRbvDT4DMtzIj6TeamOD1gqudFGeTLXgCQtYgUcjYQSiNpR6rmGkkOJUJCymypQHqcOHnA80KAdnWJ9xS7wGb1fz8RlrQx6Y87az8Md5v0p/SJhaMc7FuuFic+muCTKO/NMQRLa9qttQA3BMuadLw4nJQuDb9Jtp6Qmi5xXnVe+WUto3j3kBdeeltkuvY3T06qnndkAggY0ysQCsAAirvep16wa8D4EZ1AkrkBQEQL1ey/lsx9smpwkwBPLwONB9UxisCePKKSRMA+bbn0B8LZC2JMMO7FUZ3vOEW2GHNYP7X5CLvtsAg1vH+VRua2/5xw8LEw5kggDosbPH4YX8mhq9LBsM6RgU8E621nuSJAz3oMRnQDVzVZXf7/Rtak3Wkx+kRr6ksGfwOhAnuNAkTZuFSL7Bi/xwHbc/Ogpu4AbQdX8tRIaezKhrd+6OZWFKiRQTpzBbxphiKhKPHMcDV4OvIvi11WV2U0lADsLK6nJtVFRuw0xOgKskVLJp9+dym6G30r66Fv7618L54utvcqwcXgjLajaHXHpCljOtxHD2rBN8HFucEcs7UdYx7kp8iAY/To3q2TtsEFQoingowGNDIbExLT0za/ItMaT0pI970TMHEYckt8iqux5w2hZo1SR6BW5LorqQtbtO096PoABTJkwrhHJasysk8S+RvO1mq1WEt5nhCC+Esx599TsuaDuFBU2esAppYcVb3Ll3O3mMbzprT1Ggcpg+zibroC47ZAjr1r6JPWYQnKQzQWGisa0xo/FNEkDA/wtGpXegb+L3tByJIJN4OAtHovUih1gwGGYuqozR6fWN6sKmG41N6rwgQd6SKLgxKm7Xi0zrYurxR3pohQWLmGpZeRcJVjayRAJUAjDnPxPDOyZwSRIInS23bNiIei98oIHYwg9AZ2ZWAc73FkOQsj52XiULrnBCCw0kbQgCOFTi1gTkja0kdtK4HE4BTgfi8wCdj0Kchi5zfM X-OriginatorOrg: siemens.com X-MS-Exchange-CrossTenant-Network-Message-Id: 349a7b6a-a68f-4f5a-dd29-08dca4d48aa4 X-MS-Exchange-CrossTenant-AuthSource: DB9PR10MB4953.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jul 2024 13:46:34.8971 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 38ae3bcd-9579-4fd4-adda-b42e1495d55a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: iHj9QYsCDWKoxX/ZkCR5gTS1dZ1juK+KahNC/ynA+Uoodgsyx0Zn+Rk7zqJDsqZuNv+p9HKqbn0WWs5ZwrMFvg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR10MB7871 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 15 Jul 2024 13:46:38 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/16495 - Avoids using a busybox losetup executable that doesn't support the "--sizelimit" parameter - The "--sizelimit" parameter is needed for introducing speed-up of disk reencryption with the following commit Signed-off-by: Stefan Koch --- .../initramfs-crypt-hook/files/encrypt_partition.systemd.hook | 1 + .../initramfs-crypt-hook/initramfs-crypt-hook_0.2.bb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.systemd.hook b/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.systemd.hook index be8c117..1e8c74c 100755 --- a/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.systemd.hook +++ b/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.systemd.hook @@ -47,6 +47,7 @@ copy_exec /usr/bin/sleep || hook_error "/usr/bin/sleep not found" copy_exec /usr/sbin/e2fsck || hook_error "/usr/sbin/e2fsck not found" copy_exec /usr/sbin/resize2fs || hook_error "/usr/sbin/resize2fs not found" copy_exec /usr/sbin/cryptsetup || hook_error "/usr/sbin/cryptsetup not found" +copy_exec /usr/sbin/losetup /usr/local/sbin/losetup || hook_error "/usr/sbin/losetup not found" copy_exec /usr/bin/systemd-cryptenroll || hook_error "/usr/bin/systemd-cryptenroll not found" copy_exec /usr/lib/systemd/systemd-cryptsetup || hook_error "/usr/lib/systemd/systemd-cryptsetup not found" copy_exec /usr/bin/tpm2_pcrread || hook_error "Unable to copy /usr/bin/tpm2_pcrread" diff --git a/recipes-initramfs/initramfs-crypt-hook/initramfs-crypt-hook_0.2.bb b/recipes-initramfs/initramfs-crypt-hook/initramfs-crypt-hook_0.2.bb index 72de5b6..3497d95 100644 --- a/recipes-initramfs/initramfs-crypt-hook/initramfs-crypt-hook_0.2.bb +++ b/recipes-initramfs/initramfs-crypt-hook/initramfs-crypt-hook_0.2.bb @@ -9,7 +9,7 @@ # SPDX-License-Identifier: MIT inherit dpkg-raw -DEBIAN_DEPENDS = "initramfs-tools, cryptsetup, \ +DEBIAN_DEPENDS = "initramfs-tools, mount, cryptsetup, \ awk, openssl, libtss2-esys-3.0.2-0 | libtss2-esys0, \ libtss2-rc0 | libtss2-esys0, libtss2-mu0 | libtss2-esys0, \ e2fsprogs, tpm2-tools, coreutils, uuid-runtime"