Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5315741ybi; Tue, 4 Jun 2019 04:57:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqyHUgu6kh7AIpoB23xhIA48bD+T2DKgLtkE5AIVmneqP+lnTujXAckBaYn3XGBWDQ9BZLS8 X-Received: by 2002:a17:902:29c3:: with SMTP id h61mr1784790plb.37.1559649432690; Tue, 04 Jun 2019 04:57:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559649432; cv=none; d=google.com; s=arc-20160816; b=LHNJGH3P4n8L7PmcOKLsSfYXiLjB9x7R2mCmtsGyvtiDTY5DSCWdVULs2Ubqnp1xGK XHM8IJLdpdQp6/gLSukGI/BXuwMA+WP0o06wlq9ZzZVhlLV8nWiuoySJM19jR2SpMBAS F7ULh9LtB2yblUSQUd7K6iDHvhwb0/GwJ30NkAfpPhJC2VXFAlzcD5EyuhPTkHaliHJ0 inSjDuBgj3d/5hdCMuHrGLGdLD+/Hlwo8hZqARoirhPrksIHRI3xWOfpwj4sM1Siy97T HjN25PsdV5lA5Oyx89qzqVYwGNT9yVtSm/zqkmB58tPuLNyhbHvHOR6ZiB/mBEBzOaCI c7Xg== 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=sKomF7qIdvlM8sqeTNKqNZ3aIxUPJLa5dNljvuLetfI=; b=A8B3ra/teGi1KjaercsRhwyw/G52NW4lbW/1BD7FLpV44GRTDxQsIINjc8Op/regfM qjw8SVF7wgCXDSL6ltSrlLjMHqF/021MJPBHHvCTiwQm/MY7EO166e295ttCFS4lIV4+ Xg2nd2kb/+NwJwY08TDRseBmj1ria+UnCTwmPF1afoN/19LTBXfiqZhn4vaAsuH6GzEq ohP5yPWeCzgCaSVrFsm4wNkRMkzgSgL733kh+4/F0wVk32nxkuIfF4int2PXJ31quLSR UGanHQ7oS9iUuA3Rh4SgTpi2PJlqzU1Mig6JGshjcabyXExvcSdX+JRpiU9K9eqo8zE6 k2Ig== 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 cj14si15814736plb.141.2019.06.04.04.56.56; Tue, 04 Jun 2019 04:57:12 -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 S1727598AbfFDLzN (ORCPT + 99 others); Tue, 4 Jun 2019 07:55:13 -0400 Received: from mga12.intel.com ([192.55.52.136]:30739 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727250AbfFDLzN (ORCPT ); Tue, 4 Jun 2019 07:55:13 -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 fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Jun 2019 04:55:12 -0700 X-ExtLoop1: 1 Received: from jsakkine-mobl1.tm.intel.com (HELO localhost) ([10.237.50.189]) by orsmga006.jf.intel.com with ESMTP; 04 Jun 2019 04:55:01 -0700 Date: Tue, 4 Jun 2019 14:55:01 +0300 From: Jarkko Sakkinen To: Sean Christopherson Cc: Andy Lutomirski , Cedric Xing , Stephen Smalley , James Morris , "Serge E . Hallyn" , LSM List , Paul Moore , Eric Paris , selinux@vger.kernel.org, Jethro Beekman , Dave Hansen , Thomas Gleixner , Linus Torvalds , LKML , X86 ML , linux-sgx@vger.kernel.org, Andrew Morton , nhorman@redhat.com, npmccallum@redhat.com, Serge Ayoun , Shay Katz-zamir , Haitao Huang , Andy Shevchenko , Kai Svahn , Borislav Petkov , Josh Triplett , Kai Huang , David Rientjes , William Roberts , Philip Tricca Subject: Re: [RFC PATCH 3/9] x86/sgx: Allow userspace to add multiple pages in single ioctl() Message-ID: <20190604115501.GD30594@linux.intel.com> References: <20190531233159.30992-1-sean.j.christopherson@intel.com> <20190531233159.30992-4-sean.j.christopherson@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190531233159.30992-4-sean.j.christopherson@intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 31, 2019 at 04:31:53PM -0700, Sean Christopherson wrote: > ...to improve performance when building enclaves by reducing the number > of user<->system transitions. Rather than provide arbitrary batching, > e.g. with per-page SECINFO and mrmask, take advantage of the fact that > any sane enclave will have large swaths of pages with identical > properties, e.g. code vs. data sections. > > For simplicity and stability in the initial implementation, loop over > the existing add page flow instead of taking a more agressive approach, > which would require tracking transitions between VMAs and holding > mmap_sem for an extended duration. > > Signed-off-by: Sean Christopherson I think this completely ruins the rest of the series. We should first get the model for security done (including documentation). I would even send v21 with just that update because this series does not even apply to the mainline. I would request an update to the series with just the change to the security model. Also the very first should be dropped as it is completely unrelated cosmetic fix. /Jarkko