Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp217700ybm; Thu, 28 May 2020 00:38:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyG9ICo9uQbwETw6I1pPxT4CHEI0Cwi7inmWlXNl78G65snQKpLm3sY4bNPJHKQPsIcqjOV X-Received: by 2002:a17:906:ece4:: with SMTP id qt4mr1753075ejb.162.1590651531298; Thu, 28 May 2020 00:38:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590651531; cv=none; d=google.com; s=arc-20160816; b=I4uQ8SrtPF9/QpV9XrPn7qSb4+JE0moLWW1wEEdiIfgETiDLEHnSPV8TGvBnQwN4S1 13vLtoBHLekCek0H0KQv0xAUJE22RY/NXyMqVZ6iuD1Pqo4+gyJiMWAasHlX7XvOGRij VGD8HItj0wmZ8iEl0sXQ1MZ3q4kzDANM14B6TEjWI7uHf59p9DxK1H5ugsD8ArghK9+3 +Tzu6tO6TpPNfXV1fqckfa0D7SXszFcrA32ukWEv0g2U2VTs7nlRdPvFJJ2m/TwGcGMg gG77AYVZph5/MCKBzt0het40U/P6QWXIsMRGqpGh4/LiwgpjR/Tf28kfpklulPc0L7Yu j3Lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:ironport-sdr:ironport-sdr; bh=qvHYFKRfFZhyBNQQzW78+DuHOYBWpxfX8gaQWFWRyDA=; b=UY8UEmpQaxCu8YYxQ+ovzeAB9t8ANlcWsKT9POS6/DDEisvys8J5sLg6ilnFuprzfJ LsKhWURWrXgTiSg/Qf380KTsq/CwjWYU4blXaKwl7kR49ahOD56T486xHaqwBtzbjPxD T2GlWQRzkO3NEfW35ZD7CcN4ku94FD35g2sHS+bwnFKfR2lKNgpcMrxV5uyqUeySBwYs w/OKeihSN5bFJYszpWp2GbkSpAAjKSWvkJOAD/TTqFnx6f8MI04z/5piMuPv7ernLAlJ pFo3GK9+n+0tSr6MxJv7vJiw54EOh8pWTY/ze4zgpotaOUGmnly6x0kDJYP07ZzQyy6j OWAQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id fy2si3678607ejb.11.2020.05.28.00.38.28; Thu, 28 May 2020 00:38:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726394AbgE1Hgk (ORCPT + 99 others); Thu, 28 May 2020 03:36:40 -0400 Received: from mga12.intel.com ([192.55.52.136]:21221 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725601AbgE1Hgj (ORCPT ); Thu, 28 May 2020 03:36:39 -0400 IronPort-SDR: en6LipV8WWAPD6lIVlYbRzhStaa8Z40cWR71BCqElICsstWxAP+eV++XO6ZEengT8mq2QjYZD/ jLQG3E1alQTQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 May 2020 00:36:39 -0700 IronPort-SDR: DnLZQn9vlvIMm+BBthxvPIxdmKPkvIONmEgh7zQqOfo6IEVuPKIaXlPC6WLifraxx+rO8EEnY4 7dPiBu+KiFCA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,444,1583222400"; d="scan'208";a="469025063" Received: from dmescala-mobl1.amr.corp.intel.com (HELO localhost) ([10.252.59.102]) by fmsmga005.fm.intel.com with ESMTP; 28 May 2020 00:36:30 -0700 Date: Thu, 28 May 2020 10:36:28 +0300 From: Jarkko Sakkinen To: Borislav Petkov Cc: Sean Christopherson , linux-kernel@vger.kernel.org, x86@kernel.org, linux-sgx@vger.kernel.org, akpm@linux-foundation.org, dave.hansen@intel.com, nhorman@redhat.com, npmccallum@redhat.com, haitao.huang@intel.com, andriy.shevchenko@linux.intel.com, tglx@linutronix.de, kai.svahn@intel.com, josh@joshtriplett.org, luto@kernel.org, kai.huang@intel.com, rientjes@google.com, cedric.xing@intel.com, puiterwijk@redhat.com, Serge Ayoun , Jethro Beekman Subject: Re: [PATCH v30 07/20] x86/sgx: Enumerate and track EPC sections Message-ID: <20200528073628.GA291560@linux.intel.com> References: <20200515004410.723949-1-jarkko.sakkinen@linux.intel.com> <20200515004410.723949-8-jarkko.sakkinen@linux.intel.com> <20200525092304.GD25636@zn.tnic> <20200527035613.GH31696@linux.intel.com> <20200527203509.GF1721@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200527203509.GF1721@zn.tnic> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 27, 2020 at 10:35:09PM +0200, Borislav Petkov wrote: > > One idea would be to provide a Kconfig a la NR_CPUS or NODES_SHIFT. I.e. > > carve out the bits in sgx_epc_page_desc to allow up to N sections, but let > > the user limit the number of sections to recoup the unused memory. > > I'd prefer a good estimate of a highest value, say 8 bits, which should > suffice for the foreseeable future. That's the simplest thing to do and > our Kconfig symbols space is an abomination of gazillion symbols. OK, will do. /Jarkko