Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp613587lqg; Fri, 1 Mar 2024 15:47:46 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXI49q++XndeikoNsmBCvPZveTYhgNxXALAujoGaOoLgbgdnrnp+FurOPrJnWAIaKVYAy/i1zVB48FymSkqaOcgL7gSMFHP/2WhecP5uA== X-Google-Smtp-Source: AGHT+IE6L17IxqowSHhIw3CtDtR3P6uusXE1XW+mSmweMdm6bEcA1uQlC7EIsImz8ejzOjhZ6rai X-Received: by 2002:a05:6a20:d397:b0:1a0:8319:a0be with SMTP id iq23-20020a056a20d39700b001a08319a0bemr10207047pzb.7.1709336866056; Fri, 01 Mar 2024 15:47:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709336866; cv=pass; d=google.com; s=arc-20160816; b=Qi3B7P8ZmXJaNjlmhbvHR4eXxQ+oDoKW4pOnfhWiecKp7KukfXd5qTfmCA48D68s53 drTedL0w/FNrCVCcwFi4pjxyzldNDn0xaW24tOGURU1NQCnqkDvx/DJVRpzRlyxg0ynT VAojOY2v/PRRzZmCRyOu9vf7S9ECohIH3OGh/AyenOzuB0x5HbQ94mjUd7TMTefA858g /55AXbcKq6STBPqYnVsh37tsF+O/MSt7ELqcZZ0OGOsyUj3PUvcouLumnikjt1ADN3gR Hn4bmezI7e0FTMhp7IB6jDjowVvtFJyRzszANlVujTprYLSC9ItfmlOVd0FjtCGKw68f 5oxw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=DXpdubC/d2vfB3Dba7fFV8p90tIuVwALDNx0218cpJ8=; fh=cmTf+oBnVCJ/rZGUktUHhEe6G87PvFzPCM5r/mdrSNM=; b=KZayXEu1TnG0cdD+RKpZ2AMLyugu9EnQIwIo8Y/U735+oWpEJf2xUyKCiQj/Tjt0AZ 7Pu+5TH7xiUNYEX5jyWgVN+CEsqq3Ikp/m/laJRJ8QAdil1zuENTTPqAros5Z5SE5wen 5E68rNhdmSbwGXoS+jkgR+9Aengx8XkPI9euKDkqafIz11igRY5rbmuhRhELwtCvzTY4 VGxTP361zpdsu4mFdMlS23n8pP9t8t8bMfZzm9OWQP0y2pMQdMPleBxzFwy5lzgWEkTL KYLDlSXs5/6TBtxB0tIp5jBxaHq1eUAGRN4dbnIsTiGR5D1BNm66eip6OLZ9q2AlmYn/ JucA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JjhB4Mon; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-89232-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-89232-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id q4-20020a056a00084400b006e5a09708fbsi3793423pfk.386.2024.03.01.15.47.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 15:47:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-89232-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JjhB4Mon; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-89232-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-89232-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id E1A13B21E53 for ; Fri, 1 Mar 2024 23:46:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 47AF85F46C; Fri, 1 Mar 2024 23:46:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="JjhB4Mon" 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 6A9945EE97 for ; Fri, 1 Mar 2024 23:46:20 +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=1709336780; cv=none; b=LSh9MEDarwB1SozZFf203Bi0pFY4MSS/vwyZ93BrnIM+/8lQTFgQmR4V8OYj+IluTtQ3RArxYQJPisp//Z3PpL1qpyx41eh3zK9C0pPofDLX/gCIUYyT4x8KAytI3LeRpnpSJKNMKjPtqRHTVzg9lJ/fPrctZJZ990xJ5XwgxzU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709336780; c=relaxed/simple; bh=+uNFhMCpAr9FTagP3fHMlwrfqXFhrmRHd1x8+/2be0s=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=fDNccf9qtE+RmHbRJCtKnjAv/K12xM3NaPueNFN3Nj4lZZj2SEundcgL4bG5lnnVSgSKgJKho9qD20KnuAGkS9zTgec64xVJfkdLDxD/fbOMjc4IZlIKUx53Qqw6RPbjg2ShbcyuTREh1qmNi2Eh7yxzDZcqBJVWmbTuNhDfiBE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=JjhB4Mon; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id DED97C43394 for ; Fri, 1 Mar 2024 23:46:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709336779; bh=+uNFhMCpAr9FTagP3fHMlwrfqXFhrmRHd1x8+/2be0s=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=JjhB4MonG34FmZw8eclKbfIp5Bo3yWy8hhHNy+2o3qaZxaQ201JF0WEgy37EhqfcS UJQ98NRLJse/7wFeDe58ZDOLTeIr9+8rRPraqQTXeWGtF3v3JdLBDI+HwB5sNbooEJ wKMKG8xDtGToW80OC3HhH+WL9lPnBnWANJkT95TlSNJL0FRrISkYADmDctwGLs6smh QYQmkgBYMQHNz/7iwFBPwRvNbDYWLTfkDzd1HfV3lZuGcmwHwPx34mLzW4Gp0pApF4 SbIa0CMnUXGi+gA0kxaD016VwEyxNAvBh6QE4pHRDNkZ87y91NYMChJ6k99G+fLAjK Cj/SHLIiWkXdw== Received: by mail-lf1-f52.google.com with SMTP id 2adb3069b0e04-513382f40e9so405943e87.2 for ; Fri, 01 Mar 2024 15:46:19 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCXvNO1hbinEg4crWM47PH1s0YRpoXigoHpmBH+rdF8nDANLHlKugcel/JsrbCVpiMp7b+2rljG6vrJfClgt+OMybDtf3E48N3EvhqCq X-Gm-Message-State: AOJu0YwB+GttRP/GXpatLuVMIS3MaD7Ssc9zPEHpx0HQWMpE4DmiXvQZ R+NSahIaJUNCrDN6TbsgRTRzIh+ms+Qw11FPsJwNDD23nRI48nMBv7+jPDUuSobUg3WOUgZCsVk ve2cH94nLRyR+DLdbIH6zksf0v3s= X-Received: by 2002:ac2:5a1c:0:b0:512:a943:a0ca with SMTP id q28-20020ac25a1c000000b00512a943a0camr1744096lfn.18.1709336777989; Fri, 01 Mar 2024 15:46:17 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240227151907.387873-11-ardb+git@google.com> <20240227151907.387873-17-ardb+git@google.com> <20240301191640.GNZeIpmAU3iM1EIg4S@fat_crate.local> In-Reply-To: <20240301191640.GNZeIpmAU3iM1EIg4S@fat_crate.local> From: Ard Biesheuvel Date: Sat, 2 Mar 2024 00:46:06 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v7 6/9] x86/boot: Move mem_encrypt= parsing to the decompressor To: Borislav Petkov Cc: Ard Biesheuvel , linux-kernel@vger.kernel.org, Kevin Loughlin , Tom Lendacky , Dionna Glaze , Thomas Gleixner , Ingo Molnar , Dave Hansen , Andy Lutomirski , Brian Gerst Content-Type: text/plain; charset="UTF-8" On Fri, 1 Mar 2024 at 20:17, Borislav Petkov wrote: > > On Tue, Feb 27, 2024 at 04:19:14PM +0100, Ard Biesheuvel wrote: > > diff --git a/arch/x86/include/uapi/asm/bootparam.h b/arch/x86/include/uapi/asm/bootparam.h > > index 01d19fc22346..eeea058cf602 100644 > > --- a/arch/x86/include/uapi/asm/bootparam.h > > +++ b/arch/x86/include/uapi/asm/bootparam.h > > @@ -38,6 +38,7 @@ > > #define XLF_EFI_KEXEC (1<<4) > > #define XLF_5LEVEL (1<<5) > > #define XLF_5LEVEL_ENABLED (1<<6) > > +#define XLF_MEM_ENCRYPTION (1<<7) > > Needs documenting in Documentation/arch/x86/boot.rst. > Ack. > And yes, those 5LEVEL things are not documented either but I'm even > questioning the justification for their existence. We'll see... > Yeah that seems unnecessary to me. They are only used by kexec, and only for cases where you want to kexec a [much] older kernel that cannot deal with 5-level paging at all. AFAICT 5-level support was added in v4.13. So I think we might be able to drop these entirely, no?