Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp764580ybh; Sat, 7 Mar 2020 09:43:28 -0800 (PST) X-Google-Smtp-Source: ADFU+vtYx7yL3yXWkxVtETIW6C45WO75vMyDaXR0cONajxnsStm2zaLckDkeupXaQqtY7HZa/xY1 X-Received: by 2002:a05:6808:5d7:: with SMTP id d23mr4302756oij.63.1583603008231; Sat, 07 Mar 2020 09:43:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583603008; cv=none; d=google.com; s=arc-20160816; b=H1t9Evb554Fs6DSVAnQaRSiDRNlpEzBw2tiaxX0hZ6BbkuIyG29DzAE+BktqtD+oxm OrkdkQBBLwY9Nzl38eKNSZ0lSYzOTBokBYyZy+0T/aPhb8swaIop/ZUvXNB7JIngihgi xKYZqhHdlXuXuKpQhUXIXAPg95zMAwCjXG90fuNVeocqWEhBUJaGKmIGi4zeJkM7n3td 8C7yHWzlggoKJnqvgZwk97UPUpdHUV2xiJAb8ZJEs5mfqQeZQYTjmeumc3xRl4+wlUQz xqYaONI3MT86t1EgaV4NVGK3M0BA9+6QrSSmeWnWjBvauSftviP5T7dbWseDLgxMhmWA tMXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:reply-to:message-id :subject:cc:to:from:date; bh=/QCucxZBY2yScUnXxQcZqMFz+kqsfNFv1CwnoUkPSYI=; b=ST/bccNcy6rxFlSX76WooeJ3Q2zQj0tT/g9d/5jgyy5E+QFi/QQgix/U9e0XVK+sn1 kfshxk4WM1iXflxaaMd2Rk35huJtQQvs52g2nXg5UHkKcor82RMPBhZVc9TMytfVqG1x vYlYkaJoxOxGvLPwBvPNNP2WSMp83pthOZpjqDfMd2vLjbqLM08yRvFUvOPgnuOBYZvY Y44t6RuQUv6TFoeYmxjcSp6oAbwnuJQ1+o5X3fo5u7e5/I7/KtU26eRB4pSaqvGjQ6nX MKRvAsTG2JdCOtjKk5VEyKqmyDPQCAU2q5XgNI/9LrXY9rAV5ozR9TqDL8Ua+z3dYrPH eJxA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e24si1422184oii.259.2020.03.07.09.43.14; Sat, 07 Mar 2020 09:43:28 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726174AbgCGRmz (ORCPT + 99 others); Sat, 7 Mar 2020 12:42:55 -0500 Received: from wind.enjellic.com ([76.10.64.91]:59474 "EHLO wind.enjellic.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726105AbgCGRmz (ORCPT ); Sat, 7 Mar 2020 12:42:55 -0500 Received: from wind.enjellic.com (localhost [127.0.0.1]) by wind.enjellic.com (8.15.2/8.15.2) with ESMTP id 027HgO0B031288; Sat, 7 Mar 2020 11:42:24 -0600 Received: (from greg@localhost) by wind.enjellic.com (8.15.2/8.15.2/Submit) id 027HgNKI031287; Sat, 7 Mar 2020 11:42:23 -0600 Date: Sat, 7 Mar 2020 11:42:23 -0600 From: "Dr. Greg" To: Jarkko Sakkinen 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: <20200307174223.GA30928@wind.enjellic.com> Reply-To: "Dr. Greg" 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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200306190753.GH7472@linux.intel.com> User-Agent: Mutt/1.4i X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.3 (wind.enjellic.com [127.0.0.1]); Sat, 07 Mar 2020 11:42:24 -0600 (CST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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. 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. Since Intel signs and releases binary enclaves, (QE, LE, PCE), it would seem that a load and initialization of these enclaves would provide a good reference point for all of us to agree on with respect to basic driver testing and validation. > /Jarkko Have a good remainder of the weekend. Dr. Greg As always, Dr. G.W. Wettstein, Ph.D. Enjellic Systems Development, LLC. 4206 N. 19th Ave. SGX secured infrastructure and Fargo, ND 58102 autonomously self-defensive platforms. PH: 701-281-1686 EMAIL: greg@enjellic.com ------------------------------------------------------------------------------ "... remember that innovation is saying 'no' to 1000 things." -- Moxie Marlinspike