Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1735995ybz; Thu, 30 Apr 2020 04:43:03 -0700 (PDT) X-Google-Smtp-Source: APiQypIL5hD9oXvcrnqvP5QEI3hls5ciHforKCPkdEGsykbcGGm66wh4ftnuT3kvs5EBFXu3RhpF X-Received: by 2002:a17:906:2f8f:: with SMTP id w15mr2275962eji.255.1588246983429; Thu, 30 Apr 2020 04:43:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588246983; cv=none; d=google.com; s=arc-20160816; b=o5rRq7ou3GQnHnDEQJdhW1brPtVnHtomssIjODRGP428p0qBFDnNIutamisXccJGnc nB8mtLEMmpoPsSEMx3DNGPbbiiDHM37+rD7CKDFRC2nQWoCnDwSAt2vjf+eUg8TbAQlo GcpGPdp8p1OBbjyvsK/EaiuUW7BkefdLs0lt3pbHmqhM+4mt699uN2EJkrfqgXfqpO4W 6B+arjuox2o1bp3tXOnXf+Y+jvaXZroXBKfx10QmRhUkDTHkqkY44NbWlWvkail2r1RH yaEn8SwqTgzkLmzSuIM1zdf3S2blL8myY99yKmtKxirM4AgGngT1WHMtvfH05iNeTz9X /qlQ== 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=5XeH1zPtAudcspM1wJQFHJHuK3vCR4Jr/YYiBf3rewU=; b=HNeUCeoflQvAJ60EeFotNigMACnaOsjbRUIpM4D6CKDrw0Krc2At3njlbB3muo7U/R akqIWLcqIM+D2KymbH1DW5SZ6y+P24oooQpeEJXrdUAwnn7MsoI7bH8gQ8qPK9HgXYQ9 Ec/fUMwqPJ5n8jockR2AgtB+kkZ2UNPXBm32dCtkufqKttO0Qn08rJjvcLxbJHkSimuV oZPsQzRHPo8X2JzAtLHKNC61qixU7NUAJuisj4vACwa9Kl2j0y4/T6t75W/YdzuKH2fm PL95jE6O+hhSzilpOhgH8UtFzV+AzGfau30U5oZUNmeE6qZOrvNFDDVFwSkUhGc++OGK wECQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Vzx+jEIu; 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 i1si5254436edy.179.2020.04.30.04.42.39; Thu, 30 Apr 2020 04:43:03 -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=Vzx+jEIu; 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 S1726743AbgD3LjC (ORCPT + 99 others); Thu, 30 Apr 2020 07:39:02 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:21962 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726127AbgD3LjC (ORCPT ); Thu, 30 Apr 2020 07:39:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588246740; 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=5XeH1zPtAudcspM1wJQFHJHuK3vCR4Jr/YYiBf3rewU=; b=Vzx+jEIuGuMxwN0s2WVcHuNgn9ebkqLf3BIbkmk3I7B91hsH1jKDBi1ibUfpKYSt67FdEp gwh2xZtmVmGjfHAM7UJ890MnSKIodrm3TZcJjKfT3R9/Q4vsWMWj43YuIVRKu3qDzMKKN2 lhc6DfTSfwVsrieAYnsoCF7wxnW0oJo= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-219-5yY41YYpP_eo7Ha0Qi2dMg-1; Thu, 30 Apr 2020 07:38:58 -0400 X-MC-Unique: 5yY41YYpP_eo7Ha0Qi2dMg-1 Received: by mail-wm1-f70.google.com with SMTP id h22so715795wml.1 for ; Thu, 30 Apr 2020 04:38:58 -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=5XeH1zPtAudcspM1wJQFHJHuK3vCR4Jr/YYiBf3rewU=; b=MfJsFBGgufCMb7MFYw+9srRnEmwocEzLr83dotc1hlbF0HAWpRER1uHZn9RYpdNW7B G7rTv7Wum9yTue6hLPk8CqH+mcpgruwgwv1NCoU66SxNsBCpVKN+wjWtowV8GQv1OYVi kGWFxMiqeUUonPcyCC8zlPqcrY9KVqTOIS7dDuEKQv0HZy48ygQ9gC2IS2+C37av/PC1 3LBDob3xgWo2CogT/pVTTTz8GuCm+nXev1lPme0DYMyX1pruvBXpYs9lqfgVWMtdMEk2 Zv0r5QYWhyBnm68RQOvMP6BJwbmJ6o4zSKcQmcrOsdvrIPzoI26vFDlb865Bd0JYre1R wTXA== X-Gm-Message-State: AGi0PubS3ytwifb8gmBQzNse7tHsBsRBe5/K9VtBq1okNxetjq7k7ffT mnMhW/qPhCllm2Qu+OkatXafCZ8G3IZmunzz2fHnX+minwKQlzQzYzio8r1j2yLlMoKgSbUXFte tdAXj5K+LKFrqcanT9qcwNfAP X-Received: by 2002:a05:600c:20f:: with SMTP id 15mr2608841wmi.71.1588246737669; Thu, 30 Apr 2020 04:38:57 -0700 (PDT) X-Received: by 2002:a05:600c:20f:: with SMTP id 15mr2608811wmi.71.1588246737430; Thu, 30 Apr 2020 04:38:57 -0700 (PDT) Received: from ?IPv6:2001:b07:6468:f312:ac19:d1fb:3f5f:d54f? ([2001:b07:6468:f312:ac19:d1fb:3f5f:d54f]) by smtp.gmail.com with ESMTPSA id z18sm3494422wrw.41.2020.04.30.04.38.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 30 Apr 2020 04:38:56 -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> <095e3e9d-c9e5-61d0-cdfc-2bb099f02932@redhat.com> <602565db-d9a6-149a-0e1a-fe9c14a90ce7@amazon.com> <0a4c7a95-af86-270f-6770-0a283cec30df@amazon.com> <0c919928-00ed-beda-e984-35f7b6ca42fb@redhat.com> <702b2eaa-e425-204e-e19d-649282bfe170@amazon.com> From: Paolo Bonzini Message-ID: Date: Thu, 30 Apr 2020 13:38:55 +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: <702b2eaa-e425-204e-e19d-649282bfe170@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 30/04/20 13:21, Alexander Graf wrote: >> Also, would you consider a mode where ne_load_image is not invoked and >> the enclave starts in real mode at 0xffffff0? > > Consider, sure. But I don't quite see any big benefit just yet. The > current abstraction level for the booted payloads is much higher. That > allows us to simplify the device model dramatically: There is no need to > create a virtual flash region for example. It doesn't have to be flash, it can be just ROM. > In addition, by moving firmware into the trusted base, firmware can > execute validation of the target image. If you make it all flat, how do > you verify whether what you're booting is what you think you're booting? So the issue would be that a firmware image provided by the parent could be tampered with by something malicious running in the parent enclave? Paolo > So in a nutshell, for a PV virtual machine spawning interface, I think > it would make sense to have memory fully owned by the parent. In the > enclave world, I would rather not like to give the parent too much > control over what memory actually means, outside of donating a bucket of > it.