Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp801420ybz; Fri, 24 Apr 2020 09:30:08 -0700 (PDT) X-Google-Smtp-Source: APiQypI0ee/F4XzGf/u/2MDl4VVIvU/TXhmEXMNk3OZCro9t9i7GGO35oQxweFjkpp+wA8PTU1mn X-Received: by 2002:a50:fc82:: with SMTP id f2mr7582185edq.38.1587745807856; Fri, 24 Apr 2020 09:30:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587745807; cv=none; d=google.com; s=arc-20160816; b=SJ0/zml59JBM0i+TvAYCTiAsl3SmwqsRBMFpML84QSnLia/Tk95kZdE8LP/+hRkVIK L8/Bsh5ahBX226Boyv2U1Y7RGNXmDdfLERAvZWnDsYH/ZHFvbV+DDDQ9sDPkN7rvyVdL AHAfzU99N1daneUKRDMJlzm57DQLUmZr/Bdwn0/zC9VKfbzdp/LZblMrtdNUoPuB3oZ7 akb3LRnP274sDCDgMQnW+FVsx+aiHOkgcsNKwlfAozGWPqAwsO/TjG2AXI3iyqZB2XSI vJif2T6eJa9LUa2TPGcML+2kfKrxP1REqzJIDTCxzrgJMFYC6MgpWfhpYtJJ6CfLuWiz ZJGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=Sqa2zwpSHX/aXBjtwrDIW+4Ig2oY54LeCCkYHCPqKQY=; b=bcb3OdLBV2wtPwkYSPFPkPRmEqkMC/ict489bhagfZ7nd1e5goLcZahB32GsouDB6q 2d/O8cytoVxkDK3w940rrU+Sxk9iuJIRuRi1Vf7VUIgy0nijAxz1HC8G+qbl56HwHZqP cdE9lpo2rZUfAt295DTLYwRVz/5SQr1NUtGuvCe3BB3LwY4b5m0M2y57M0XwldlL0vpa wKtv0XXpNlKNKF8WY+DV8upQmcWLA6xQWYS65HxcvlNBPu4oVFUMGG3d+LI+PogMQd9X fhAvQXnLNbS5sTZoEVPIT+H0O5SZUUixy+ZrdVJvDSStVzvuQxn5xCUL9wSmTLCs2ECZ Hy7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=WbH8cdbD; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d16si930124ejb.187.2020.04.24.09.29.44; Fri, 24 Apr 2020 09:30:07 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=WbH8cdbD; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728343AbgDXQ17 (ORCPT + 99 others); Fri, 24 Apr 2020 12:27:59 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:46269 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726908AbgDXQ15 (ORCPT ); Fri, 24 Apr 2020 12:27:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587745676; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Sqa2zwpSHX/aXBjtwrDIW+4Ig2oY54LeCCkYHCPqKQY=; b=WbH8cdbDGB8rTyog55Tt3rseHuLDUFPR9n8tS6YfkOc2ixsDOIdS3si6OTuwF79l3l1LcJ ab4P4HtAS3XAvcK4B2Iw+uHEzLyMXU8mFB/eM6SulqgJ+j8c0fEHT6/JiHeFRjkDf+sAtL PQYHQ80TaiFerQhsgQ7TtNJovtwTnfc= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-208-sRlwYJKmP8ObAq_ruuZ2yA-1; Fri, 24 Apr 2020 12:27:54 -0400 X-MC-Unique: sRlwYJKmP8ObAq_ruuZ2yA-1 Received: by mail-wm1-f69.google.com with SMTP id h184so4044873wmf.5 for ; Fri, 24 Apr 2020 09:27:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Sqa2zwpSHX/aXBjtwrDIW+4Ig2oY54LeCCkYHCPqKQY=; b=cZRoerR5hizambH29biRPA6rs/fSzrWULGSE6fuboC1AB3mJX4sRBADf2rN64fFA9T pG+99cVYv02ijnt2BKVBUUv7SyBtCYF3k93WbYFkTKd4r2vi5AgYZTC7TEzJqSZAy7MH Q5JQclV9MrND8xROXFdl2jmNCDJGC1n/xtGGtAgFxtHfwQXGZiYOjnuLr8XrsENf9MiS SWj9VU52DSW22RJUMJUdw9asoz5/A7DFEa6bFizGRwAA2nz6XpOQO/3FVU6FHst+PN7q FO8fHyOsBg9qclZgkMjc0Sj13CRFkD76OqTzkeZX7r8ZiKyv7+VSc+YsKu8Y94UwDVoh 7SZQ== X-Gm-Message-State: AGi0Pub1JA5nTrMyi0DqkxV59fmyExGMrDaI1+GgtxLaErADAWzoScqc z5sPAgSZ+iHsjYB37QshKvEUwnGIeXQF0x5xxoCbsvCM4980bItghnL/wkow2MgualNFh8cVhls XtYHAZSBsT3zPU0yTJOWvkLzp X-Received: by 2002:adf:f1c6:: with SMTP id z6mr4968449wro.361.1587745670674; Fri, 24 Apr 2020 09:27:50 -0700 (PDT) X-Received: by 2002:adf:f1c6:: with SMTP id z6mr4968408wro.361.1587745670416; Fri, 24 Apr 2020 09:27:50 -0700 (PDT) Received: from [192.168.10.150] ([93.56.170.5]) by smtp.gmail.com with ESMTPSA id y10sm3443488wma.5.2020.04.24.09.27.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 24 Apr 2020 09:27:49 -0700 (PDT) Subject: Re: [PATCH v1 00/15] Add support for Nitro Enclaves To: Alexander Graf , "Paraschiv, Andra-Irina" , linux-kernel@vger.kernel.org Cc: Anthony Liguori , Benjamin Herrenschmidt , Colm MacCarthaigh , Bjoern Doebel , David Woodhouse , Frank van der Linden , Martin Pohlack , Matt Wilson , Balbir Singh , Stewart Smith , Uwe Dannowski , kvm@vger.kernel.org, ne-devel-upstream@amazon.com References: <20200421184150.68011-1-andraprs@amazon.com> <18406322-dc58-9b59-3f94-88e6b638fe65@redhat.com> <2a4a15c5-7adb-c574-d558-7540b95e2139@redhat.com> <1ee5958d-e13e-5175-faf7-a1074bd9846d@amazon.com> <80489572-72a1-dbe7-5306-60799711dae0@amazon.com> <0467ce02-92f3-8456-2727-c4905c98c307@redhat.com> <5f8de7da-9d5c-0115-04b5-9f08be0b34b0@amazon.com> From: Paolo Bonzini Message-ID: <095e3e9d-c9e5-61d0-cdfc-2bb099f02932@redhat.com> Date: Fri, 24 Apr 2020 18:27:48 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <5f8de7da-9d5c-0115-04b5-9f08be0b34b0@amazon.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 24/04/20 14:56, Alexander Graf wrote: > Yes, that part is not documented in the patch set, correct. I would > personally just make an example user space binary the documentation for > now. Later we will publish a proper device specification outside of the > Linux ecosystem which will describe the register layout and image > loading semantics in verbatim, so that other OSs can implement the > driver too. But this is not part of the device specification, it's part of the child enclave view. And in my opinion, understanding the way the child enclave is programmed is very important to understand if Linux should at all support this new device. > To answer the question though, the target file is in a newly invented > file format called "EIF" and it needs to be loaded at offset 0x800000 of > the address space donated to the enclave. What is this EIF? * a new Linux kernel format? If so, are there patches in flight to compile Linux in this new format (and I would be surprised if they were accepted, since we already have PVH as a standard way to boot uncompressed Linux kernels)? * a userspace binary (the CPL3 that Andra was referring to)? In that case what is the rationale to prefer it over a statically linked ELF binary? * something completely different like WebAssembly? Again, I cannot provide a sensible review without explaining how to use all this. I understand that Amazon needs to do part of the design behind closed doors, but this seems to have the resulted in issues that reminds me of Intel's SGX misadventures. If Amazon has designed NE in a way that is incompatible with open standards, it's up to Amazon to fix it for the patches to be accepted. I'm very saddened to have to say this, because I do love the idea. Thanks, Paolo