Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3149788ybi; Sun, 14 Jul 2019 07:39:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqynFBfwz8o+4zq+9tMC4h3Yc15FzhE/Fnxxn/84aWw9gd/59AsMjvOLVA/n5GkdoQQGYMSd X-Received: by 2002:a63:3112:: with SMTP id x18mr21923541pgx.385.1563115154742; Sun, 14 Jul 2019 07:39:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563115154; cv=none; d=google.com; s=arc-20160816; b=n8HgzX1MLhCScSy7dORHLxVz+0MKeMshZE9rIqmmMVfrhIYy/akQN6k2IcFhC3PV9s iWhWeOhIOanS6J17gFkK6mNR47FMIhM275H3AzYXWqa0l82Jkxa/kzc9bxVFjbJSGyID EpV2xSqx3UsI4671XtY4SyqWWxby83hIwprw8Vf3ZaXEld777zguDURsWdKWD4uZML/g kCHw8utCTnNL+UzoNt+wWZ+w5Yl122YvMUQk2QUatoBb6zqPe1khlF4+YmvBnlVh0t0p bks2oRMMZCyR1Ffw17ZfmorUYOUKEzT5AYyorxq639aHpU9Ee497SXYad9iLmcNTH9uB Nxbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=Vz9kTDrzc7OmrRJMsPS46R0f7nBAHB1afo7wMdveIaM=; b=bWwkHtTLK1WjehIYMG3o5ZYDEJ4YI/QzgAhCOF2OOkz2YSwlXD9pFDgJpRpIbZDPuW Nks8OHFOA3M/hzUi484lOrYDzgoDP5ku2nAq1lD5rNja5VxxZjKyG+X9TuuKZe5pU76S OdtCxSxrrUDlU7ehCsfR/rMQvcqOANg5rYQawrgP8EGqc/D4bn0P88mhm2kVt7JztsLj 0jKHUfD+tDjXxfdC6tyw7CqWUZoDy1jRLv9Mo9QtO28Ms0Kl+SOsYlrQD2cjd/G6mhWm nX+iJcivqBaDBEQ/CppiKkC6DfpmXg2lj9HtTGGPmiN6CiJ4afP9L4Xnuht6Dic4tva6 8LJQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id i68si13868050pfc.153.2019.07.14.07.38.58; Sun, 14 Jul 2019 07:39:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1728548AbfGNOh3 (ORCPT + 99 others); Sun, 14 Jul 2019 10:37:29 -0400 Received: from mga03.intel.com ([134.134.136.65]:58007 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728146AbfGNOh3 (ORCPT ); Sun, 14 Jul 2019 10:37:29 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Jul 2019 07:37:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,490,1557212400"; d="scan'208";a="172004767" Received: from hgenzken-mobl.ger.corp.intel.com (HELO localhost) ([10.249.35.131]) by orsmga006.jf.intel.com with ESMTP; 14 Jul 2019 07:36:54 -0700 Date: Sun, 14 Jul 2019 17:36:53 +0300 From: Jarkko Sakkinen To: linux-kernel@vger.kernel.org, x86@kernel.org, linux-sgx@vger.kernel.org Cc: akpm@linux-foundation.org, dave.hansen@intel.com, sean.j.christopherson@intel.com, nhorman@redhat.com, npmccallum@redhat.com, serge.ayoun@intel.com, shay.katz-zamir@intel.com, haitao.huang@intel.com, andriy.shevchenko@linux.intel.com, tglx@linutronix.de, kai.svahn@intel.com, bp@alien8.de, josh@joshtriplett.org, luto@kernel.org, kai.huang@intel.com, rientjes@google.com, cedric.xing@intel.com Subject: Re: [PATCH v21 00/28] Intel SGX foundations Message-ID: <20190714143653.ziwgmtgysknxfgnl@linux.intel.com> References: <20190713170804.2340-1-jarkko.sakkinen@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190713170804.2340-1-jarkko.sakkinen@linux.intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jul 13, 2019 at 08:07:36PM +0300, Jarkko Sakkinen wrote: > v21: > * Check on mmap() that the VMA does cover an area that does not have > enclave pages. Only mapping with PROT_NONE can do that to reserve > initial address space for an enclave. > * Check om mmap() and mprotect() that the VMA permissions do not > surpass the enclave permissions. > * Remove two refcounts from vma_close(): mm_list and encl->refcount. > Enclave refcount is only need for swapper/enclave sync and we can > remove mm_list refcount by destroying mm_struct when the process > is closed. By not having vm_close() the Linux MM can merge VMAs. > * Do not naturally align MAP_FIXED address. > * Numerous small fixes and clean ups. > * Use SRCU for synchronizing the list of mm_struct's. > * Move to stack based call convention in the vDSO. I forgot something: * CONFIG_INTEL_SGX_DRIVER is not bistate i.e. no more LKM support. It is still useful to have the compile-time option because VM host does not need to have it enabled. Now sgx_init() calls explicitly sgx_drv_init(). In addition, platform driver has been ripped a way because we no longer need ACPI hotplug. In effect, the device is now parentless.