Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp74688ybt; Mon, 6 Jul 2020 04:27:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxtOgWkbQv27r4tvPYhHh9mF6khj+lPcj2z9e00nIo2HKtuSxh3naJ03KSeWwE/gct4mfLS X-Received: by 2002:a17:906:384a:: with SMTP id w10mr44499863ejc.235.1594034849220; Mon, 06 Jul 2020 04:27:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594034849; cv=none; d=google.com; s=arc-20160816; b=Rvlf83fW5+XpKipxr0KsmOtk/o9kVIUXg8CR+fFpUaGxQZ7yiFqbnQ/cZMnQGrP+rC Gt4THSwJ4bOY/mVGArkgZ9YTsjZdrvqebzuf+SDXp6wvn6ISnCETtIZxcHiuwHEeIkyA DkVs2Lja5yK7bG10SnUVCPTWN7GuqK8rT5QB21sDwTiGYVWGXdlr99OFlMLM5J/jgBjQ uKni3DIme0R6asq60E7oYqHvbOpMJZQaLsIVQzigtxF1U2MdAu/0w3yaIeDgDiH/JoO8 yDygX3uCnoNcg4rhlCGjZoh+YKyVJoEuLV++Me9/0UrSQtC/RZadU8s6olOn11bHfH61 0E0Q== 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:ironport-sdr :dkim-signature; bh=gjuXNZmNz3Hv/J5qgV6vAqVuo3lygZIiVt+Jirx5OXE=; b=Po8+f15qilhYs9gdEb+QDYKpYLMuQzpPmjfc+PXbCbfS4k3W6Zru5YReIl25dX7DKp 1t2O66HmB9tEi6ObbzPN0Pqkvp05R70ADErZ2BLbSmsiiIs0bp4szbxaZKWbLHRvosbt 0KWjZz932eYUaBis7ahOwxAZfoAba7Ry8vSTHWuwkOa3JnTixAEtTDKq+WOVlpbkgup2 quEXRTjBhfKiDoCU/d1nL/E6XSRUq6LTpCAW/hkic3xiR8QKiuB6L6973SjxD/gHzt9j LrJkhcs8ortyMYGicmxWmnd+MsA+FV8RlRMccFN8HtuyPk1VrY3ipW3LiWaoDcyedrRs 7/rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=S4yIPsi9; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bz17si12135342ejc.222.2020.07.06.04.27.06; Mon, 06 Jul 2020 04:27:29 -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=@amazon.com header.s=amazon201209 header.b=S4yIPsi9; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728875AbgGFL06 (ORCPT + 99 others); Mon, 6 Jul 2020 07:26:58 -0400 Received: from smtp-fw-9102.amazon.com ([207.171.184.29]:12482 "EHLO smtp-fw-9102.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728578AbgGFL05 (ORCPT ); Mon, 6 Jul 2020 07:26:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1594034817; x=1625570817; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=gjuXNZmNz3Hv/J5qgV6vAqVuo3lygZIiVt+Jirx5OXE=; b=S4yIPsi9KnYgYgUGs88NMDzWeMQsNGXI5CeMNt7vDEDk2iD3qErOvjeo OMF9McLhifVmcY7ixQLKd0YDysVr6tH2NBYbfspUVPXaGhIWhweTjPj2Z FgJf+qnFfIxroLYIIcUnQYbME4KCwdLO+aI0igbG3Bn7WGpFFE8zqGS4u o=; IronPort-SDR: jaA4zTFDArA7PL8f8WlSV3ecirlEZsx4CMacUY/VAjg2eB5DgAUP/fPl5yjcf3LunjeWPQdRcd 0CIlMvwtEbkA== X-IronPort-AV: E=Sophos;i="5.75,318,1589241600"; d="scan'208";a="57611640" Received: from sea32-co-svc-lb4-vlan3.sea.corp.amazon.com (HELO email-inbound-relay-1a-16acd5e0.us-east-1.amazon.com) ([10.47.23.38]) by smtp-border-fw-out-9102.sea19.amazon.com with ESMTP; 06 Jul 2020 11:26:55 +0000 Received: from EX13MTAUWC001.ant.amazon.com (iad55-ws-svc-p15-lb9-vlan2.iad.amazon.com [10.40.159.162]) by email-inbound-relay-1a-16acd5e0.us-east-1.amazon.com (Postfix) with ESMTPS id 09218A1D35; Mon, 6 Jul 2020 11:26:53 +0000 (UTC) Received: from EX13D20UWC001.ant.amazon.com (10.43.162.244) by EX13MTAUWC001.ant.amazon.com (10.43.162.135) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 6 Jul 2020 11:26:53 +0000 Received: from 38f9d3867b82.ant.amazon.com (10.43.161.203) by EX13D20UWC001.ant.amazon.com (10.43.162.244) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 6 Jul 2020 11:26:46 +0000 Subject: Re: [PATCH v4 13/18] nitro_enclaves: Add logic for enclave termination To: Andra Paraschiv , CC: Anthony Liguori , Benjamin Herrenschmidt , Colm MacCarthaigh , "Bjoern Doebel" , David Woodhouse , "Frank van der Linden" , Greg KH , Martin Pohlack , Matt Wilson , "Paolo Bonzini" , Balbir Singh , "Stefano Garzarella" , Stefan Hajnoczi , Stewart Smith , Uwe Dannowski , , References: <20200622200329.52996-1-andraprs@amazon.com> <20200622200329.52996-14-andraprs@amazon.com> From: Alexander Graf Message-ID: <34a0bee8-aaf4-d221-cd6e-41b5f3d8f335@amazon.com> Date: Mon, 6 Jul 2020 13:26:42 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <20200622200329.52996-14-andraprs@amazon.com> Content-Language: en-US X-Originating-IP: [10.43.161.203] X-ClientProxiedBy: EX13D18UWA001.ant.amazon.com (10.43.160.11) To EX13D20UWC001.ant.amazon.com (10.43.162.244) Content-Type: text/plain; charset="windows-1252"; format="flowed" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 22.06.20 22:03, Andra Paraschiv wrote: > An enclave is associated with an fd that is returned after the enclave > creation logic is completed. This enclave fd is further used to setup > enclave resources. Once the enclave needs to be terminated, the enclave > fd is closed. > = > Add logic for enclave termination, that is mapped to the enclave fd > release callback. Free the internal enclave info used for bookkeeping. > = > Signed-off-by: Alexandru Vasile > Signed-off-by: Andra Paraschiv Reviewed-by: Alexander Graf Alex Amazon Development Center Germany GmbH Krausenstr. 38 10117 Berlin Geschaeftsfuehrung: Christian Schlaeger, Jonathan Weiss Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B Sitz: Berlin Ust-ID: DE 289 237 879