From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 87848C433DF for ; Tue, 23 Jun 2020 08:59:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 65FF120723 for ; Tue, 23 Jun 2020 08:59:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="MW0hA/5A" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731860AbgFWI7Y (ORCPT ); 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--