Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp506265imu; Thu, 8 Nov 2018 11:21:45 -0800 (PST) X-Google-Smtp-Source: AJdET5ddm3P+chEk/bSTTTNvJb0mkGQrGLWx+dWB8/bSFNtDQ/oMOrUsRZROcC+5gE6uTtsE33qA X-Received: by 2002:a17:902:9897:: with SMTP id s23-v6mr5892313plp.229.1541704904986; Thu, 08 Nov 2018 11:21:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541704904; cv=none; d=google.com; s=arc-20160816; b=HFXV0kNInofb9oaNnEwoIO6HPZqThaieRqynz6Tr/CwF7qIPdO0Nej+Q18YIIYr2ud dYKErZyFM36QABQ6cAXBLTBrTxDDbCAz+BjPvPBv+jDcyZCav2rY6ui0VwDpsdx9ldN5 o6jgQXtxO+tiwUYe6v7NUYtb5QzaI0WpQocjHe463JELB4EOXVd3fgt5AXB0jm+6x6SV H1978qnGoH87ftZAybTIn8epd2f6E7t6Xu2estweQPEAMTu8JKVP+WJNkpixugoaCDK3 KAgem7lDfU8NXJZGnVn6+QwtGcWqJCpY/a7AzYqSAqLrP43QAOxT0uLJnL18NY99Ewtz 96ew== 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=Mimqs8/eeUmF0NJtoCOTSNk9bJyul7cnZyS7cRJhjss=; b=00FM+GMsxN7fjBd9zHy64tDU4UqK43F77/d4IIVUkYNF13QTH5ohUVjCMV0oZ+FpFj +JsYJ2q37eiieNDBia2hzJe30Q/RSqUhkI+kQ7rJGV9IXKS+NPaw59rD3u9FoExaF/yP fZBIE6sEHq5FINxQ6FirIXSlETDjU+ssP3qfv5yCMR3k1Vrvp5AzcM78xNkvVKRUHYyj JoSk0OQs/rXOzWWXhcIDzp7e/WMvdQQxDAwjqPuNC+3CTOIOGtFRn/kOjc4on5tGvEdS IqSG7BTjdf0KnuA7TepC7YsKctPn8xBPSDBsVM0LkplnDU6Zx1pI6i6ST8f4rFi/ckSR sNug== 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 a59-v6si940305plc.48.2018.11.08.11.21.29; Thu, 08 Nov 2018 11:21:44 -0800 (PST) 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 S1727281AbeKIE5n (ORCPT + 99 others); Thu, 8 Nov 2018 23:57:43 -0500 Received: from mga18.intel.com ([134.134.136.126]:18972 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726974AbeKIE5m (ORCPT ); Thu, 8 Nov 2018 23:57:42 -0500 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Nov 2018 11:20:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,480,1534834800"; d="scan'208";a="98724815" Received: from smartikx-mobl2.ger.corp.intel.com (HELO localhost) ([10.249.254.135]) by orsmga003.jf.intel.com with ESMTP; 08 Nov 2018 11:20:41 -0800 Date: Thu, 8 Nov 2018 21:20:40 +0200 From: Jarkko Sakkinen To: Dave Hansen Cc: x86@kernel.org, platform-driver-x86@vger.kernel.org, linux-sgx@vger.kernel.org, sean.j.christopherson@intel.com, nhorman@redhat.com, npmccallum@redhat.com, serge.ayoun@intel.com, shay.katz-zamir@intel.com, haitao.huang@intel.com, mark.shanahan@intel.com, andriy.shevchenko@linux.intel.com, Jonathan Corbet , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , "open list:DOCUMENTATION" , open list Subject: Re: [PATCH v15 23/23] x86/sgx: Driver documentation Message-ID: <20181108192040.GA21685@linux.intel.com> References: <20181102231320.29164-1-jarkko.sakkinen@linux.intel.com> <20181102231320.29164-24-jarkko.sakkinen@linux.intel.com> <154ded23-fd1d-f324-4e0a-9de8eddcda6d@intel.com> <20181106054911.GA15575@linux.intel.com> <20181107163019.GA11509@linux.intel.com> <914dd171-b48a-12d9-eb77-3c40c8b210cb@intel.com> <20181108143942.GA13792@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181108143942.GA13792@linux.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 Thu, Nov 08, 2018 at 04:39:42PM +0200, Jarkko Sakkinen wrote: > On Wed, Nov 07, 2018 at 09:09:37AM -0800, Dave Hansen wrote: > > On 11/7/18 8:30 AM, Jarkko Sakkinen wrote: > > >> Does this code run when I type "make kselftest"? If not, I think we > > >> should rectify that. > > > No, it doesn't. It is just my backup for the non-SDK user space code > > > that I've made that I will use to fork my user space SGX projects in > > > the future. > > > > > > I can work-out a selftest (and provide a new patch in the series) but > > > I'm still wondering what the enclave should do. I would suggest that > > > we start with an enclave that does just EEXIT and nothing else. > > > > Yeah, that's a start. But, a good selftest would include things like > > faults and error conditions. > > Great. We can add more entry points to the enclave for different tests > but I'll start with a bare minimum. And yeah but ever goes into next > version I'll document the fault handling. For the v17 I'll add exactly two test cases: 1. EENTER/EEXIT 2. EENTER/exception So that it will easier to evaluate and demonstrate exception handling. /Jarkko