Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3430591ybt; Tue, 23 Jun 2020 02:01:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy22xC5+B2T6xyarrjdSvWG0jdA9LqoBhk3K2IdML9/bfboMep/z2G3HV0xR4KPgwFsOUeQ X-Received: by 2002:a50:d753:: with SMTP id i19mr16847844edj.9.1592902918581; Tue, 23 Jun 2020 02:01:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592902918; cv=none; d=google.com; s=arc-20160816; b=U/NwSedIDAfJuoVfsrKbY2h5ObWrX7PiSpATno+i+IQQU3zQOI5835f/1XLaacZSPe TQ1gkPXAuxR9MInQ2Z+MWgMRoObH5AurHWiXLY7umQENYVPgkpoA3FLeyNTtayrlU/xV OptCGndlMRteHptOUSBTWHt1z1NGvFnD8wy6u9+bOcBnV/DAnFJCAweHvhbFD4jw3494 c0D4addY+MUmIJTh/vfxDcB8odneUuuy9ULC41w5GULNe4o23OcRU5hWSbH3hOyVeIT8 rz6ixBKAK/h9ajx16hdHZlGRF1jGmc/7wNF5iWxSvV2pmMQWFISBvGOoXcnQmkBzAnXG f2kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition:in-reply-to :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=GmSiSTe5jRQCybzks4GiyZ26oQ9Db64kMPNmljxfAUo=; b=DbKnX/w6Qha+r3pzHNTpnCSSlIYJ32paGKAuFbFYAHwcU8fTLt4McbvxaCdO5VL2lb kdxNZNzU/We7JmlP7WVPM+1Z5FVa7HfGGXuzAmXXYLhk6B+A6q7T4QwfB5Lsh/G1dCZV JE3CaizzhoO0SZGVUfU1+1VFJKYhZKT/Gxv44t/noZ7GTyOiZQ4feLzkrhtTfwIj2AOb FF4zz01v7TFueQQCB7zt1pstZ4bZW8tNwVdFhM2JLrveJ6W8VAsqY5eAxcwxnzWVbidp rq33h9blpyKmWCaOhxTG0O1RhCiLYPyT9o7ilf4XNnCYkxVFHEfhcIF+8vlw+9iEjCi0 ZVMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="MW0hA/5A"; 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 lh7si10781940ejb.106.2020.06.23.02.01.34; Tue, 23 Jun 2020 02:01:58 -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="MW0hA/5A"; 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 S1731852AbgFWI7Y (ORCPT + 99 others); Tue, 23 Jun 2020 04:59:24 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:54646 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731158AbgFWI7Y (ORCPT ); Tue, 23 Jun 2020 04:59:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1592902763; 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: in-reply-to:in-reply-to:references:references; bh=GmSiSTe5jRQCybzks4GiyZ26oQ9Db64kMPNmljxfAUo=; b=MW0hA/5AIfRZ0mz9s3Pqn5YwxMF8JjYKetT3CSZh/guL0pdXkHJKKin3zmjmD37qdoQr0U iFED/jTZYM1YhKFyzfsA7c+S1FFF5DX2g1uHm8JCI5AoXiK9C2+aMGVdH8HqYeILDq+wgk BvXL2GiuOjPA1MlDbJpwMd/XA9LO/AY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-189-g7mPeteWNNKxhttc1B8icA-1; Tue, 23 Jun 2020 04:59:19 -0400 X-MC-Unique: g7mPeteWNNKxhttc1B8icA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 93A0F18A8220; Tue, 23 Jun 2020 08:59:17 +0000 (UTC) Received: from localhost (ovpn-112-109.ams2.redhat.com [10.36.112.109]) by smtp.corp.redhat.com (Postfix) with ESMTP id 24FE47168D; Tue, 23 Jun 2020 08:59:16 +0000 (UTC) Date: Tue, 23 Jun 2020 09:59:15 +0100 From: Stefan Hajnoczi To: Andra Paraschiv Cc: linux-kernel@vger.kernel.org, Anthony Liguori , Benjamin Herrenschmidt , Colm MacCarthaigh , Bjoern Doebel , David Woodhouse , Frank van der Linden , Alexander Graf , Greg KH , Martin Pohlack , Matt Wilson , Paolo Bonzini , Balbir Singh , Stefano Garzarella , Stewart Smith , Uwe Dannowski , kvm@vger.kernel.org, ne-devel-upstream@amazon.com Subject: Re: [PATCH v4 17/18] nitro_enclaves: Add overview documentation Message-ID: <20200623085915.GF32718@stefanha-x1.localdomain> References: <20200622200329.52996-1-andraprs@amazon.com> <20200622200329.52996-18-andraprs@amazon.com> MIME-Version: 1.0 In-Reply-To: <20200622200329.52996-18-andraprs@amazon.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="sDKAb4OeUBrWWL6P" Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --sDKAb4OeUBrWWL6P Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Jun 22, 2020 at 11:03:28PM +0300, Andra Paraschiv wrote: > +The kernel bzImage, the kernel command line, the ramdisk(s) are part of the > +Enclave Image Format (EIF); plus an EIF header including metadata such as magic > +number, eif version, image size and CRC. > + > +Hash values are computed for the entire enclave image (EIF), the kernel and > +ramdisk(s). That's used, for example, to check that the enclave image that is > +loaded in the enclave VM is the one that was intended to be run. > + > +These crypto measurements are included in a signed attestation document > +generated by the Nitro Hypervisor and further used to prove the identity of the > +enclave; KMS is an example of service that NE is integrated with and that checks > +the attestation doc. > + > +The enclave image (EIF) is loaded in the enclave memory at offset 8 MiB. The > +init process in the enclave connects to the vsock CID of the primary VM and a > +predefined port - 9000 - to send a heartbeat value - 0xb7. This mechanism is > +used to check in the primary VM that the enclave has booted. > + > +If the enclave VM crashes or gracefully exits, an interrupt event is received by > +the NE driver. This event is sent further to the user space enclave process > +running in the primary VM via a poll notification mechanism. Then the user space > +enclave process can exit. > + > +[1] https://aws.amazon.com/ec2/nitro/nitro-enclaves/ > +[2] https://www.kernel.org/doc/Documentation/vm/hugetlbpage.txt > +[3] https://lwn.net/Articles/807108/ > +[4] https://www.kernel.org/doc/html/latest/admin-guide/kernel-parameters.html > +[5] https://man7.org/linux/man-pages/man7/vsock.7.html Is the EIF specification and the attestation protocol available? Stefan --sDKAb4OeUBrWWL6P Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEhpWov9P5fNqsNXdanKSrs4Grc8gFAl7xxGMACgkQnKSrs4Gr c8ilQAgAySyG/iUuzEfDma7s6a9gpS3VSxdadu7D4zfWtsotaQR3ZIiAzSHXAIXt 3YDUtxYWfz7HHHTtch14TrQkXYlpuWMshTNgMCq552345hWPBDwWQqtX6yxbQrlo 1AFvwLmLuebUyOWzxumR5gIOvspTEyqa90WFlY8uY4DoFPX/uCSvblGCt134IJKk vA2iWwXW2CBMTztmYSw1ia7cBhVb5digZI1+NGSrw7VWhGaSswu6THsuY1R/qasW kPA3CwnBDQEK4EoC/x21bsFm3q0mczumiMqwDhnXk1MpPSbV90wdpxGeG41ixZ5H p6U7rD60bV08qx/MwjSsA8KnumbzJg== =Az/F -----END PGP SIGNATURE----- --sDKAb4OeUBrWWL6P--