Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp4117162pxu; Mon, 12 Oct 2020 09:53:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFJRG3IrjKsNvWgXnWZyGZT+o65pE1/kAd6GUrEbQjtcVFhiNz49YaTVx39nmSwZxh16MT X-Received: by 2002:a17:906:bc50:: with SMTP id s16mr10864776ejv.275.1602521618991; Mon, 12 Oct 2020 09:53:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602521618; cv=none; d=google.com; s=arc-20160816; b=ELUx9hQ8+VGVvKfO6D5y7eKpNHFzcC2r1/UlAKiaSQ3458ucGIMDXIGGBX8QbB+a48 r14We17sDfK0ZLEr9kCflyWpg+mlMYkXHe4rEnF8Mvt8bf22wUtRKrT7YbByv1vhZjNy grwpymcuj8qJjUsBd2xPlaF5vfWFWlou6q42ygONj/WMQm8NVwk9rRTyesVglyPzm0cQ UfHQHXj6AZ/pP3pAyYmzrddsKOzrvHB+OfYqq2ipkofSNHKTcVbjvWEdk8Blx5mmwDhH syGwQywCVa80YfPClCFP9WAYb8LUGsTYdvaQenJyZ5BM0SKbzSMZV8uyGrfipnGM+1Yo Ofaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=gXZkuiR+c4H50VmRaz8PiKEODrBID/3Xh/IKp6dLC6M=; b=vb6cgth0+KcR7qdChAfAcD0witflEgK4mQljOOMyDNub3TiKnkF4OnlDdHQaeevtHp uAWSTm+tcpqv/sgjgWGSPTAM2IwtHlBrO5Vj1VZvGEQHYIYImZVam4Bggs8mpI6gFn8h S8t2kuLkkC7zwT0hi8rRD1n9mAR1xmOmQbN9j6S+HWMDZQd4L9qB33uCeTNQS8Y2NhgL 3pexjwwsa3XMJX6Hmjy8GPWKu2Dgaz21TC8z+gRKlwba4h/pDKShpcN2yMOSsX3wtwPz GWMLJe0jUOIJ5nTMHhGDxFLHYreAsxyT5rGOn/AU8+LFCMzY0HnUBOgmhxEYmYhYUoeo FUDQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id y15si12422282edu.407.2020.10.12.09.53.15; Mon, 12 Oct 2020 09:53:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S2403923AbgJLQvL (ORCPT + 99 others); Mon, 12 Oct 2020 12:51:11 -0400 Received: from mga14.intel.com ([192.55.52.115]:25720 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403778AbgJLQvL (ORCPT ); Mon, 12 Oct 2020 12:51:11 -0400 IronPort-SDR: nY42OOrW8chaxgnwBnIk8k1XjiDNXdqjm/zkcHbilZQBbsif5IG+SdsHWfBZ6Wax4R+lYvUdo+ Kxe9Cdnf0sjA== X-IronPort-AV: E=McAfee;i="6000,8403,9772"; a="164985053" X-IronPort-AV: E=Sophos;i="5.77,367,1596524400"; d="scan'208";a="164985053" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Oct 2020 09:51:08 -0700 IronPort-SDR: tSLYrDYHK7fbzX4zjazH/J4S8MUExl9kkpOfCYw+SomYDqq5ugNWk4t0AD3iIZCusG32CA9od5 5LrCcEXvhU+Q== X-IronPort-AV: E=Sophos;i="5.77,367,1596524400"; d="scan'208";a="530042114" Received: from lohmeies-mobl.ger.corp.intel.com (HELO localhost) ([10.252.37.19]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Oct 2020 09:50:55 -0700 Date: Mon, 12 Oct 2020 19:50:51 +0300 From: Jarkko Sakkinen To: x86@kernel.org, linux-sgx@vger.kernel.org, Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, Shuah Khan , linux-kselftest@vger.kernel.org, akpm@linux-foundation.org, andriy.shevchenko@linux.intel.com, asapek@google.com, bp@alien8.de, cedric.xing@intel.com, chenalexchen@google.com, conradparker@google.com, cyhanish@google.com, dave.hansen@intel.com, haitao.huang@intel.com, kai.huang@intel.com, kai.svahn@intel.com, kmoy@google.com, ludloff@google.com, luto@kernel.org, nhorman@redhat.com, npmccallum@redhat.com, puiterwijk@redhat.com, rientjes@google.com, sean.j.christopherson@intel.com, tglx@linutronix.de, yaozhangx@google.com, mikko.ylinen@intel.com Subject: Re: [PATCH v39 22/24] selftests/x86: Add a selftest for SGX Message-ID: <20201012165051.GA8475@linux.intel.com> References: <20201003045059.665934-1-jarkko.sakkinen@linux.intel.com> <20201003045059.665934-23-jarkko.sakkinen@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201003045059.665934-23-jarkko.sakkinen@linux.intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Oct 03, 2020 at 07:50:57AM +0300, Jarkko Sakkinen wrote: > Add a selftest for SGX. It is a trivial test where a simple enclave > copies one 64-bit word of memory between two memory locations. > > Cc: Shuah Khan > Cc: linux-kselftest@vger.kernel.org > Signed-off-by: Jarkko Sakkinen Greg, speaking of dual licensing, I'd make an expection with this selftest to what we agreed in the last week. It's the only compact C-only example that I'm aware of that shows how to put together the basics of an SGX user space. Here a more permissive licensing would make sense in my opinion just to give a seed for alternatives. Right now the user space implementations are either in C++ and Rust, and they work great for big things like containers etc. I could envision someone to have something more minimalistic to do something simple for lets say a system daemon. I've done a similar decision with tools/testing/selftests/tpm2/tpm2.py in the past. What do you think? /Jarkko