Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp4496120rwb; Mon, 21 Nov 2022 08:14:36 -0800 (PST) X-Google-Smtp-Source: AA0mqf5kvuSmL7cyuu/VsPvDB63B44UUZALjufeimoe97w8+/G/AhldaZd1DXWhi/aAh9Q4cWy5W X-Received: by 2002:a17:906:35c8:b0:78d:3a04:e41d with SMTP id p8-20020a17090635c800b0078d3a04e41dmr16665792ejb.39.1669047276554; Mon, 21 Nov 2022 08:14:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669047276; cv=none; d=google.com; s=arc-20160816; b=lZgmYaVj5FE5ba5H03S2AHpnDFoz5Odcw9qCJwcBn7fUi+ewYMm5Vf8AaCT0PBfjhL m88xsloY+k7lFNF+PLRM+hK0jZ/Gn43qY0wfokAG90L6wtICfl6lJI6PsNK9ICqcQPnR nfDg6WeLX3q/CQsYdYs501tmJtI3PJhmGbeypnHAA8AJ7ENrL5nCbWmkiytYGcv1YU7G o5TttXfOHykDP+PEd3hH1ySDzNZQl+rlULLE/0/Tuo6q5TIKPrFlqF/ZE5KrYd8el/gu /9nx1c9RojJ6MGRFFdIxP1Mrgbrp+o4Zv2BT6DfHi8QBmAzal1flR9xnjWcCd7vRFC8H XEFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=+osXJY2QXTYeyNKIAKOMhij/UAd21czb/7vY0ki9kpc=; b=qYCjUyK8mMHl6k8V6DGs1nIqO3YIMKPVEB2tBKxPh/HdqQ/Cd1Y200ZESqS9KnZAOE qrp5QLiaTvF6MtAmt2XXEXDDu7a0kWqKFcIORo/H3HIRb5m7lL/MvfmsoXj6UwVaRGzE qg2b5LKjMDlfxPKZUZKUYtPwlDYXNexmGKuZovAuucO++qIKoHhIB4i3YO9lmwUv77TW UZTrzQbm1wt44KfE8l6u5VINO2t1rS8tgKivJbR/Zqkr7BEouXOV7lYzLJb4i9WTh59/ D4Qd1NEJ3e5Pz+Mv9XRFHNlUZ0cl8408e3+LE9OoLR8Y5OFv15jHceMEpfkqH4HhP9jX F5jA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=VZ+XKQnb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i4-20020a05640242c400b00468ccfbba7asi10321243edc.387.2022.11.21.08.14.08; Mon, 21 Nov 2022 08:14:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=VZ+XKQnb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231928AbiKUOpA (ORCPT + 91 others); Mon, 21 Nov 2022 09:45:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231911AbiKUOom (ORCPT ); Mon, 21 Nov 2022 09:44:42 -0500 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24DB7CFEAF; Mon, 21 Nov 2022 06:39:49 -0800 (PST) Received: from zn.tnic (p200300ea9733e725329c23fffea6a903.dip0.t-ipconnect.de [IPv6:2003:ea:9733:e725:329c:23ff:fea6:a903]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 98D451EC071C; Mon, 21 Nov 2022 15:39:15 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1669041555; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=+osXJY2QXTYeyNKIAKOMhij/UAd21czb/7vY0ki9kpc=; b=VZ+XKQnbaEmRfwdIHK9ZzB/ZSuhoZHvDxVRg+GB4AUBk82YT9fu1EMg9MZ31xOwrEH269C OWAZnc7TETiDIMavhyueeZdptLH2SupS3CpiCK6EyHrJhxWGBj/9DiYtq9lE3ke7Do3yw6 Hl/mQULTVCjJ4lh7tKV+hpBGpX+O2Ec= Date: Mon, 21 Nov 2022 15:39:11 +0100 From: Borislav Petkov To: "Michael Kelley (LINUX)" Cc: Sathyanarayanan Kuppuswamy , "hpa@zytor.com" , KY Srinivasan , Haiyang Zhang , "wei.liu@kernel.org" , Dexuan Cui , "luto@kernel.org" , "peterz@infradead.org" , "davem@davemloft.net" , "edumazet@google.com" , "kuba@kernel.org" , "pabeni@redhat.com" , "lpieralisi@kernel.org" , "robh@kernel.org" , "kw@linux.com" , "bhelgaas@google.com" , "arnd@arndb.de" , "hch@infradead.org" , "m.szyprowski@samsung.com" , "robin.murphy@arm.com" , "thomas.lendacky@amd.com" , "brijesh.singh@amd.com" , "tglx@linutronix.de" , "mingo@redhat.com" , "dave.hansen@linux.intel.com" , Tianyu Lan , "kirill.shutemov@linux.intel.com" , "ak@linux.intel.com" , "isaku.yamahata@intel.com" , "Williams, Dan J" , "jane.chu@oracle.com" , "seanjc@google.com" , "tony.luck@intel.com" , "x86@kernel.org" , "linux-kernel@vger.kernel.org" , "linux-hyperv@vger.kernel.org" , "netdev@vger.kernel.org" , "linux-pci@vger.kernel.org" , "linux-arch@vger.kernel.org" , "iommu@lists.linux.dev" Subject: Re: [Patch v3 05/14] x86/mm: Handle decryption/re-encryption of bss_decrypted consistently Message-ID: References: <1668624097-14884-1-git-send-email-mikelley@microsoft.com> <1668624097-14884-6-git-send-email-mikelley@microsoft.com> <01d7c7cc-bd4e-ee9b-f5b2-73ea367e602f@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 18, 2022 at 02:55:32AM +0000, Michael Kelley (LINUX) wrote: > But I had not thought about TDX. In the TDX case, it appears that > sme_postprocess_startup() will not decrypt the bss_decrypted section. > The corresponding mem_encrypt_free_decrypted_mem() is a no-op unless > CONFIG_AMD_MEM_ENCRYPT is set. But maybe if someone builds a > kernel image that supports both TDX and AMD encryption, it could break sme_me_mask better be 0 on a kernel with both built in and running as a TDX guest. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette