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 X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 840DCC4338F for ; Thu, 12 Aug 2021 21:17:22 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 081D86109F for ; Thu, 12 Aug 2021 21:17:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 081D86109F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=shutemov.name Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 6F8556B006C; Thu, 12 Aug 2021 17:17:21 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 680C46B0071; Thu, 12 Aug 2021 17:17:21 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 521556B0072; Thu, 12 Aug 2021 17:17:21 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0152.hostedemail.com [216.40.44.152]) by kanga.kvack.org (Postfix) with ESMTP id 35F316B006C for ; Thu, 12 Aug 2021 17:17:21 -0400 (EDT) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id D99DB1844DF31 for ; Thu, 12 Aug 2021 21:17:20 +0000 (UTC) X-FDA: 78467689440.01.42A5AF2 Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) by imf01.hostedemail.com (Postfix) with ESMTP id 8CB8850435AD for ; Thu, 12 Aug 2021 21:17:20 +0000 (UTC) Received: by mail-lf1-f41.google.com with SMTP id d4so15896237lfk.9 for ; Thu, 12 Aug 2021 14:17:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov-name.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=b2BirSVgdv61++1qgCbkrnEDz6Qii/PCQKwWPaT0kRE=; b=VXmNW/rBJjdUX9bbBX1Ste1p1ni7x23r3FJaTKr3DW4fSW4SfMOjOvvLLadmtYdpQO 9w03+1YiJybcJHP6mCNeW6hfv0Lxz0nEktyf7Kyn7XA2D63hOgBVjOT3XNBpIqe9ENNN f7BBJC8R6fcBzt+RfzsK7e93zOmRpIgy8Ug4dfESSUA+NO/fUnva/RYm3FuAjdIskbVM 2GMapYddrr6YMdGjT2yHJ99APmM9o/ef0nymvWWWi5b08V+ixhnntkmGKyO6te6SX6IM hMmU7uW9OHFG9WrQq9Hal7fItPeI/pSkXgCN7Wk0wJJhGEIPbvVFbaqsaWChG/wqjFle ODVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=b2BirSVgdv61++1qgCbkrnEDz6Qii/PCQKwWPaT0kRE=; b=Uo3qG9wkjXW5HrX6XSEybfi+B3HLbSV10GzCBIBVdGcIdvkny8lB709xgJ4S6etMbG OgBLZf2oivPy2MEKo4itYl5mod53ZCJs0Q8Yjl5ZITff8xHjoZEptO3nIgJSwcRKcAKh sKT2QUIXHR+YK7wf1hmXip2nIgqcEjZekh7qiO9faKRdsh2+GG4ztAqUKFR/qMNgF8zt 2GdjDUZ1oOyot8UGFa7/WS4VgCB9Kg7RhCrwTuW8VYoI1+PTvC8p7KymWoTkca5Kr+I2 CUwLZjtCVdRJsvamwC/7we2qmV2BK6hv4robd3Uiwpw44lGLenWVoFb7BThL5XQwtGF5 fdNw== X-Gm-Message-State: AOAM533ZrTJXGaBJVhOQrrAr22Csao+R5f8oLyP5/aor8N9guwy4Bs/p vGrT0Xz02AWvBG8Kwan712zkew== X-Google-Smtp-Source: ABdhPJxqIiUrSNtMEkd3DckwzHM+lwkbd5+BtE5CifV6cR0ixYu839okyszKguc39ACYMEkzvwj5zA== X-Received: by 2002:ac2:5d4a:: with SMTP id w10mr3941318lfd.529.1628803039302; Thu, 12 Aug 2021 14:17:19 -0700 (PDT) Received: from box.localdomain ([86.57.175.117]) by smtp.gmail.com with ESMTPSA id p2sm371787lft.157.2021.08.12.14.17.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Aug 2021 14:17:18 -0700 (PDT) Received: by box.localdomain (Postfix, from userid 1000) id 69A1C102BEE; Fri, 13 Aug 2021 00:17:32 +0300 (+03) Date: Fri, 13 Aug 2021 00:17:32 +0300 From: "Kirill A. Shutemov" To: Dave Hansen Cc: "Kirill A. Shutemov" , Borislav Petkov , Andy Lutomirski , Sean Christopherson , Andrew Morton , Joerg Roedel , Andi Kleen , Kuppuswamy Sathyanarayanan , David Rientjes , Vlastimil Babka , Tom Lendacky , Thomas Gleixner , Peter Zijlstra , Paolo Bonzini , Ingo Molnar , Varad Gautam , Dario Faggioli , x86@kernel.org, linux-mm@kvack.org, linux-coco@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/5] efi/x86: Implement support for unaccepted memory Message-ID: <20210812211732.l46uwa5p22s4nsqg@box.shutemov.name> References: <20210810062626.1012-1-kirill.shutemov@linux.intel.com> <20210810062626.1012-3-kirill.shutemov@linux.intel.com> <07c2770e-1171-24ab-9403-91b306b5b1a4@intel.com> <20210810190836.cffj4fjqenuunwsd@black.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 8CB8850435AD Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b="VXmNW/rB"; spf=none (imf01.hostedemail.com: domain of kirill@shutemov.name has no SPF policy when checking 209.85.167.41) smtp.mailfrom=kirill@shutemov.name; dmarc=none X-Rspamd-Server: rspam01 X-Stat-Signature: 9wwzgxmoodg1amwpi3qpado9g414o54o X-HE-Tag: 1628803040-981647 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, Aug 10, 2021 at 12:19:22PM -0700, Dave Hansen wrote: > On 8/10/21 12:08 PM, Kirill A. Shutemov wrote: > >>> +config UNACCEPTED_MEMORY > >>> + bool > >>> + depends on EFI_STUB > >>> + help > >>> + Some Virtual Machine platforms, such as Intel TDX, introduce > >>> + the concept of memory acceptance, requiring memory to be accepted > >>> + before it can be used by the guest. This protects against a class of > >>> + attacks by the virtual machine platform. > >>> + > >>> + This option adds support for unaccepted memory and makes such memory > >>> + usable by kernel. > >> Do we really need a full-blown user-visible option here? If we, for > >> instance, just did: > >> > >> config UNACCEPTED_MEMORY > >> bool > >> depends on EFI_STUB > >> > >> it could be 'select'ed from the TDX Kconfig and no users would ever be > >> bothered with it. Would a user *ever* turn this on if they don't have > >> TDX (or equivalent)? > > But it's already not user selectable. Note that there's no prompt next to > > the "bool". The "help" section is just for documentation. I think it can > > be useful. > > Ahh, gotcha. I misread it. Seems like an odd thing to do, but it's > also fairly widespread in the tree. > > Can you even reach that help text from any of the configuration tools? > If you're doing an 'oldconfig', you won't get a prompt to do the "?". > Even in the 'meunconfig' search results, it doesn't display "help" text, > only the "prompt". I don't know how get a tool show the text, but my vim sees just fine :P > BTW, should this text call out that this is for parsing an actual UEFI > feature along with the spec version? It's not obvious from the text > that "unaccepted memory" really is a UEFI thing as opposed to being some > kernel-only concept. Okay. -- Kirill A. Shutemov