Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp294748rdb; Thu, 1 Feb 2024 08:41:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IGArQy7A/qbVH+QaizY9wMlHm7zbwjLbh80a/wQC1zv3WlOAOCiKkQpCaUef+puwPZVAxm3 X-Received: by 2002:a05:6358:2c81:b0:176:860c:cc5a with SMTP id l1-20020a0563582c8100b00176860ccc5amr6571298rwm.5.1706805700417; Thu, 01 Feb 2024 08:41:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706805700; cv=pass; d=google.com; s=arc-20160816; b=Lw9EngKIPwsXRQpG4V0iRPErA3Ra2txmTPETZwktRt31ElRO7m8/nhCsWD/9vm0fyh h7F9uLYxTA+DpG9RG0YfDLTQFpHBnYSl2uGfgG29QIpAi4TMsqmCPs19o6XQo39KUQwa e3vu2Hxxp0/uvD87EO0cKQjYFnir+pIvvRjSSGa6H7kI00e9iRQg//WNVxshOyjNAclY XJmaUzlDIni3NN00u9VaDKezNSa+82VThDdx+90y0YdGexCipQlDRKYIdzLQUSTviNwN djbvyVQjhra7G30vUe3VSLkHL9oRNtUTYAcJ/CPxsJ1uofVTemCkmPy3HpE/CXZitq6b /uzA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=AYoNkt7FBERipsA6+gWOzsLUUlJSiRlytP9Ua8kgOO8=; fh=JLcEni1q28nlmIYeeKBfBzfY3VzFSvfWSfoahJv2h3o=; b=FWxKyk14FWxJwnf73YFJAqpJRSdtifdHy+US1v1qb5M7k94MQLdhAB+Y7G4yWEht+i Zq8m49KKYCFxBNF0z+TK13MdPX0XZ6zRQ0PifjuA3sGjEci71Tzzp2ftWOyqzqbiMCSn 3Bm+aql2hRfEt0wtZQX+l46CdPFLNnbjjiE0dsjJfb1fXtYe0knAjBmwzaQkyFSMeom1 vaJm17mUVlW30f60fh5fgRk7Fr6FcVnnYuuaJb7mTqXkAF+pdmsq2vQVVhf/1vHaHzje 0ptQI1r/oNNQwQ1haMqRf9nZJcreZKePL2ZSJQbuC0ZbVDjp1/llvi0aZv5a+bsz0PI+ v1Xw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CV3Coqwd; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-48527-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48527-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCUmRh/gUaXgTWMYvbMnuaq7YLBpJEOPhKDL38iFzfrWtgJ7s2AOm3XQ5+/k7FGYWO+u9RPhAMIZh97aU/OerH8u3d79Vavw9jMTa/KPLg== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id t18-20020a63b252000000b005cd8f461cf1si12001129pgo.515.2024.02.01.08.41.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 08:41:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-48527-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CV3Coqwd; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-48527-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48527-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id A7361298D28 for ; Thu, 1 Feb 2024 16:30:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5F3465E23E; Thu, 1 Feb 2024 16:28:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="CV3Coqwd" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 84AD35A4DD; Thu, 1 Feb 2024 16:28:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706804917; cv=none; b=jvHp2umBnhsqFyC94U6SO4Za9Zfkwkz9LkDGe13VnYSXgetjc4fCBrtTrvhQ1HRl+KzfcaYPZ+YlCtD9VlRxKx9DNba+4ZEm2klL3p7U/bzMmYwl9pi1hQGBcHVxwuixSmGsf1EIz6SDjdJU5R+7Tu+y3SAYYMqZvhIJxVyQ92g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706804917; c=relaxed/simple; bh=AYoNkt7FBERipsA6+gWOzsLUUlJSiRlytP9Ua8kgOO8=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=RhGXn9ih1dgx0ELG1iZvxEwu/zlE3XOwbSNtb1W8bicjJWNozF6m/3Ba+UPno/xfITsu6M9LpeEKx/SmehBpecE9glhqA3zPb/HsF8hsF8L2D1RbDwxYGOAhrUMdCepXHlXAUS05SOY+Z8/pZ4WS4q3b8S3+hdqrLMP8BNVPjDc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=CV3Coqwd; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0B1CCC433C7; Thu, 1 Feb 2024 16:28:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706804917; bh=AYoNkt7FBERipsA6+gWOzsLUUlJSiRlytP9Ua8kgOO8=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=CV3CoqwdSSmMD8zmP5QrTCOkRJLjaGMSF95A7VIPYV/EV/MMM2FJvyXgwlcafjaaN iLHNQ+FqZ2otMTGTqfGpgMw+M1aeoyprZmM1x+9u4Y4iN3tD0MelYB9aPlwPY39i/Y F/1wxlcobf6un6EIHMNNol4Fw7XvihnSkfpNipuuLF8b4uCsK86xil3OIpTuilWQd5 i/+B6BE/GV1VkRi2ua9Ffc7cPyMUq9fJb+Sn77q0o/JudVwFZKKWpA3uIXndgKsBGv Da9hHc0npRpi8zXPY7U3rdff78VEehn/Wh+PKlWTFu93U9l9aDDh1n9Bpq2bAH7NW4 0keUfCRnAKREQ== Received: by mail-lf1-f43.google.com with SMTP id 2adb3069b0e04-5113000a426so1375197e87.2; Thu, 01 Feb 2024 08:28:36 -0800 (PST) X-Gm-Message-State: AOJu0YyFHBjJkiz7/CzOgO15faXOjwuyShHRq8W2n81yIoT90HtUUzP3 s3Nxw5P36BXoZIKRHKGhoZ1oACbKjUCppb8arEq9+UBu4tYcY99wNcgb136UrtCJ2o0/tQM01xV 08b99gRRvbBEH7JA46q51NNBcaoY= X-Received: by 2002:a05:6512:70:b0:511:b86:35b5 with SMTP id i16-20020a056512007000b005110b8635b5mr2032216lfo.9.1706804915280; Thu, 01 Feb 2024 08:28:35 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240129180502.4069817-21-ardb+git@google.com> <20240129180502.4069817-22-ardb+git@google.com> <20240131073156.GHZbn3bILaWLEluzp-@fat_crate.local> In-Reply-To: From: Ard Biesheuvel Date: Thu, 1 Feb 2024 17:28:22 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 01/19] efi/libstub: Add generic support for parsing mem_encrypt= To: Kevin Loughlin Cc: Borislav Petkov , Ard Biesheuvel , linux-kernel@vger.kernel.org, Tom Lendacky , Dionna Glaze , Thomas Gleixner , Ingo Molnar , Dave Hansen , Andy Lutomirski , Arnd Bergmann , Nathan Chancellor , Nick Desaulniers , Justin Stitt , Kees Cook , Brian Gerst , linux-arch@vger.kernel.org, llvm@lists.linux.dev, Conrad Grobler , Andri Saar , Sidharth Telang Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 1 Feb 2024 at 17:23, Kevin Loughlin wrot= e: > > On Tue, Jan 30, 2024 at 11:32=E2=80=AFPM Borislav Petkov w= rote: > > > > On Mon, Jan 29, 2024 at 07:05:04PM +0100, Ard Biesheuvel wrote: > > > From: Ard Biesheuvel > > > > > > Parse the mem_encrypt=3D command line parameter from the EFI stub if > > > CONFIG_ARCH_HAS_MEM_ENCRYPT=3Dy, so that it can be passed to the earl= y > > > boot code by the arch code in the stub. > > > > I guess all systems which do memory encryption are EFI systems anyway s= o > > we should not worry about the old ones... > > There is at least one non-EFI firmware supporting memory encryption: > Oak stage0 firmware [0]. However, I think Ard's patch seems simple > enough to adopt in non-EFI firmware(s) if needed. I merely wanted to > point out the existence of non-EFI memory encryption systems for > potential future cases (ex: reviewing more complex patches at the > firmware interface). > > [0] https://github.com/project-oak/oak/tree/main/stage0_bin > The second patch in this series actually implements the mem_encrypt=3D parsing for both EFI and non-EFI boot. I just broke this out in a separate patch because it affects architectures other than x86.