From mboxrd@z Thu Jan 1 00:00:00 1970 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id A046EC433EF for ; Tue, 7 Dec 2021 20:07:25 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1C1D16B0071; Tue, 7 Dec 2021 15:07:15 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 171946B0072; Tue, 7 Dec 2021 15:07:15 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0373C6B0073; Tue, 7 Dec 2021 15:07:14 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0157.hostedemail.com [216.40.44.157]) by kanga.kvack.org (Postfix) with ESMTP id E60E56B0071 for ; Tue, 7 Dec 2021 15:07:14 -0500 (EST) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id ABFE71854B9E4 for ; Tue, 7 Dec 2021 20:07:04 +0000 (UTC) X-FDA: 78892081968.14.40A5728 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by imf05.hostedemail.com (Postfix) with ESMTP id 16D24100007 for ; Tue, 7 Dec 2021 20:07:03 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id A2A0CCE1D63; Tue, 7 Dec 2021 20:06:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 65E5FC341C1; Tue, 7 Dec 2021 20:06:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1638907617; bh=FSLhkQaVEX4dZ0fRYSqHC72laF/cCWIOhtt3ea/nX1I=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Au5zEZNVNz/BP4lbQZPH5XikalbsunVV6IX4OhCHDMFothBnUy1rmTRqTHm+r+IPg QRWV13JsYuO0vQNPj0RfUfVkao09D+yaWpxvflgKMBSDyECeoeciBahAupV/FPO/8m B10yDlmIBFYfEd0p+QsiN+yXHj/aR+J6mVLk/zexbf711nPNUVLhL0kDCHYx4+V/89 4X4Ub64KfxdCeoGvVOXCHBtVNlNFGU3nBTicPZsxnX4+inTHs6crndKhlIZQmxu+Zk 3R2Y+757qc6m1CFB02LZARnMpVzhnX2hCbVHahS2f6awiQ7Oz4H68eNDluOjNALNie 3Ym3IMN50txdg== Date: Tue, 7 Dec 2021 22:06:44 +0200 From: Mike Rapoport To: Dave Hansen Cc: Martin Fernandez , Richard Hughes , linux-kernel@vger.kernel.org, linux-efi@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-mm@kvack.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, ardb@kernel.org, dvhart@infradead.org, andy@infradead.org, gregkh@linuxfoundation.org, rafael@kernel.org, akpm@linux-foundation.org, daniel.gutson@eclypsium.com, alex.bazhaniuk@eclypsium.com, alison.schofield@intel.com Subject: Re: [PATCH v3 0/5] x86: Show in sysfs if a memory node is able to do encryption Message-ID: References: <20211203192148.585399-1-martin.fernandez@eclypsium.com> <1ed6020b-f84b-a29b-690a-9eee683c93a6@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1ed6020b-f84b-a29b-690a-9eee683c93a6@intel.com> X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 16D24100007 X-Stat-Signature: it8hoz6oxd153tz1ttp6r5dyuuswctcf Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Au5zEZNV; spf=pass (imf05.hostedemail.com: domain of rppt@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=rppt@kernel.org; dmarc=pass (policy=none) header.from=kernel.org X-HE-Tag: 1638907623-140756 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Dec 07, 2021 at 11:52:54AM -0800, Dave Hansen wrote: > On 12/7/21 11:45 AM, Martin Fernandez wrote: > >> I wonder, for example, why did you choose per-node reporting rather than > >> per-region as described in UEFI spec. > > Some time ago we discussed about this and concluded with Dave Hansen > > that it was better to do it in this per-node way. > > Physical memory regions aren't exposed to userspace in any meaningful way. Well, we have /sys/firmware/memory that exposes e820... > An ABI that says "everything is encrypted" is pretty meaningless and > only useful for this one, special case. > > A per-node ABI is useful for this case and is also useful going forward > if folks want to target allocations from applications to NUMA nodes > which have encryption capabilities. The ABI in this set is useful for > the immediate case and is useful to other folks. I don't mind per-node ABI, I'm just concerned that having a small region without the encryption flag set will render the entire node "not encryptable". This may happen because a bug in firmware, a user that shoot themself in a leg with weird memmap= or some hidden gem in interaction between e820, EFI and memblock that we still didn't discover. I agree that per-node flag is useful, but maybe we should also have better granularity as well. -- Sincerely yours, Mike.