Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp668454ybh; Tue, 10 Mar 2020 06:10:55 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsbK5dqespk9T0kIWQ2CaP/zquPr0zxHN+bLReRLjt7XK4O8JftFjZXATBaEI1E1PBeERau X-Received: by 2002:a9d:694a:: with SMTP id p10mr7048890oto.151.1583845855837; Tue, 10 Mar 2020 06:10:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583845855; cv=none; d=google.com; s=arc-20160816; b=IbTP6nPzADCDsIzxrqs5oA33OR4YgoXiHmmN+cAIkKhyy5qEsX124W0n74CNWN9EFn EDlttBD2MXA/xzdTICMeXlZfbgb7jdzx700Lqp6nP4E4+gWtYMefrCBK0V9lAyBA61mR meVYMO1o0MmmbgD7rn1hiITgMk60DWXIHRxDwcFgF6M/2fkPp1mvE5A7kPxBngsRQWpQ yshhPBO3eD96p0Yr+iUyWEsA0FTTinZAZgAOjyg3M8aRh5FNTjUC57H90Uu2surTCpZ6 H7COJZJJP5wZEkINIG/B/T9QLDhPdY2Q4eaxA7/NRdsu3VzR9iqyxubyzPweTULu4fH7 yX5A== 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; bh=bvluDyr4o4MLQ8FFx7RCeDHH7VxcliqZmcjVOH9FeyU=; b=u322y6PJv5DKvJ3lW3KpB8o8Uq9sgWrBQWCi/Ie0P9yptBbnFb/4t9W1KmR5iWz5Fl Grbs3nSZtuKk3PJb0AVIHYMZVIus3Da89glP4T9IRg9hfGfP5FbfZCIMSJUt6x446VEB 0hXjFMAXkUKaEav3dvap1s7J15YiB6vTyYq2wXFT16cxVv6pQzywGQl0nQfM1jZrnFe+ z6aWpdVnGCwFJIbznxxNmwcZoiPz1WO2S5SYZsMNQrLWXQWEiWHJJ7CwheI9ontmH3bO chmHykayQ95GrpviTOl/Dy89OksNweXN+BvGcDbCucOnq+HBV45abuIZ7BTh2hgoBLSy Yezg== 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 n6si7695376otq.159.2020.03.10.06.10.40; Tue, 10 Mar 2020 06:10:55 -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 S1731118AbgCJNI2 (ORCPT + 99 others); Tue, 10 Mar 2020 09:08:28 -0400 Received: from mga01.intel.com ([192.55.52.88]:19572 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731107AbgCJNIZ (ORCPT ); Tue, 10 Mar 2020 09:08:25 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Mar 2020 06:08:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,537,1574150400"; d="scan'208";a="388926224" Received: from akharche-mobl2.ccr.corp.intel.com (HELO localhost) ([10.251.86.23]) by orsmga004.jf.intel.com with ESMTP; 10 Mar 2020 06:08:19 -0700 Date: Tue, 10 Mar 2020 15:08:18 +0200 From: Jarkko Sakkinen To: "Dr. Greg" Cc: Nathaniel McCallum , linux-kernel@vger.kernel.org, x86@kernel.org, linux-sgx@vger.kernel.org, akpm@linux-foundation.org, dave.hansen@intel.com, "Christopherson, Sean J" , Neil Horman , "Huang, Haitao" , andriy.shevchenko@linux.intel.com, tglx@linutronix.de, "Svahn, Kai" , bp@alien8.de, Josh Triplett , luto@kernel.org, kai.huang@intel.com, rientjes@google.com, cedric.xing@intel.com, Patrick Uiterwijk , linux-kselftest@vger.kernel.org Subject: Re: [PATCH v28 14/22] selftests/x86: Add a selftest for SGX Message-ID: <20200310130818.GA32334@linux.intel.com> References: <20200303233609.713348-1-jarkko.sakkinen@linux.intel.com> <20200303233609.713348-15-jarkko.sakkinen@linux.intel.com> <04362c0cf66bf66e8f7c25a531830b9f294d2d09.camel@linux.intel.com> <20200306154222.GA20820@wind.enjellic.com> <20200306190753.GH7472@linux.intel.com> <20200307174223.GA30928@wind.enjellic.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200307174223.GA30928@wind.enjellic.com> 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 Sat, Mar 07, 2020 at 11:42:23AM -0600, Dr. Greg wrote: > On Fri, Mar 06, 2020 at 09:07:53PM +0200, Jarkko Sakkinen wrote: > > Good morning, I hope the weekend is going well for everyone. > > > Actually many people have applaused to have a small scoped, even if > > not perfect, test program to look at how SGX works. One that is only > > dependent on glibc. None of the selftests are meant to be production > > peaces of code. You are getting wrong the role of the selftest in > > the first place. > > We certainly want to be counted in the camp of those who are > applausing you for making the selftests available, particularly the > new VDSO setup and entry code. > > We arguably have similar motivations. We architected and authored an > entire SGX runtime that has as its only dependencies the MUSL C > library, libelf and OpenSSL, primarily because we needed an easily > auditable and low footprint SGX implementation. Good to hear! > To the point at hand though, I'm certainly not a very smart guy so I > doubt that I am able to understand the role of the selftests. We do > seem to agree though that they only provide a rudimentary exercise of > the driver. The role of kselftests is not to be production code. They are somewhat adhoc pieces of code that just check that "things turn on" e.g. in a new kernel release or a new hardware platform. > We also seem to agree that the primary role of the driver is to > service the needs of those of us that are building production level > SGX runtime stacks. In service of that premise, it would be helpful > to know if you are internally testing the driver/VDSO against enclaves > of production quality, with metadata, or just the two page selftest > enclave. I do agree that a more complete test suite would be an essential thing to have. In that I'd just use the SDK and implement it outside the kernel tree. Unfortunately I do not have time to implement such. /Jarkko