From patchwork Fri Aug 27 13:32:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Paraschiv, Andra-Irina" X-Patchwork-Id: 12462155 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=-19.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham 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 6D2A1C432BE for ; Fri, 27 Aug 2021 13:33:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 513C8601FD for ; Fri, 27 Aug 2021 13:33:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245243AbhH0Ndu (ORCPT ); Fri, 27 Aug 2021 09:33:50 -0400 Received: from smtp-fw-6001.amazon.com ([52.95.48.154]:23944 "EHLO smtp-fw-6001.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245156AbhH0Ndt (ORCPT ); Fri, 27 Aug 2021 09:33:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1630071182; x=1661607182; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=wh/CawUQ7CY8Snqcn644V6JnliWp+GzBGu4r/WJhUOI=; b=SS4xoNx3/xAI9fdeFSbRw81PUk+rE47COWNooECPyAMiGJ2ea52V8CXx zSl6E/dNXyCk8s/hPSalptJBKorLSrqSX6KPTR2sjLDDKV9eK3Lgm7tUb s2B1+JuINKUzCGBM5mnWyel0ZT0jf8ZIHZxL5xZdd/XZUQ3JbLaU+yYcJ U=; X-IronPort-AV: E=Sophos;i="5.84,356,1620691200"; d="scan'208";a="137217030" Received: from iad12-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-2a-c5104f52.us-west-2.amazon.com) ([10.43.8.6]) by smtp-border-fw-6001.iad6.amazon.com with ESMTP; 27 Aug 2021 13:32:52 +0000 Received: from EX13D16EUB003.ant.amazon.com (pdx1-ws-svc-p6-lb9-vlan3.pdx.amazon.com [10.236.137.198]) by email-inbound-relay-2a-c5104f52.us-west-2.amazon.com (Postfix) with ESMTPS id 0AEBCA17F3; Fri, 27 Aug 2021 13:32:50 +0000 (UTC) Received: from 38f9d34ed3b1.ant.amazon.com (10.43.161.176) by EX13D16EUB003.ant.amazon.com (10.43.166.99) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Fri, 27 Aug 2021 13:32:44 +0000 From: Andra Paraschiv To: linux-kernel CC: Alexandru Ciobotaru , Greg KH , Kamal Mostafa , "Alexandru Vasile" , Paolo Bonzini , "Stefano Garzarella" , Stefan Hajnoczi , Vitaly Kuznetsov , kvm , ne-devel-upstream , Andra Paraschiv Subject: [PATCH v2 1/7] nitro_enclaves: Enable Arm64 support Date: Fri, 27 Aug 2021 16:32:24 +0300 Message-ID: <20210827133230.29816-2-andraprs@amazon.com> X-Mailer: git-send-email 2.20.1 (Apple Git-117) In-Reply-To: <20210827133230.29816-1-andraprs@amazon.com> References: <20210827133230.29816-1-andraprs@amazon.com> MIME-Version: 1.0 X-Originating-IP: [10.43.161.176] X-ClientProxiedBy: EX13d09UWA004.ant.amazon.com (10.43.160.158) To EX13D16EUB003.ant.amazon.com (10.43.166.99) Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Update the kernel config to enable the Nitro Enclaves kernel driver for Arm64 support. Changelog v1 -> v2 * No changes. Signed-off-by: Andra Paraschiv Acked-by: Stefano Garzarella --- drivers/virt/nitro_enclaves/Kconfig | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/virt/nitro_enclaves/Kconfig b/drivers/virt/nitro_enclaves/Kconfig index 8c9387a232df8..f53740b941c0f 100644 --- a/drivers/virt/nitro_enclaves/Kconfig +++ b/drivers/virt/nitro_enclaves/Kconfig @@ -1,17 +1,13 @@ # SPDX-License-Identifier: GPL-2.0 # -# Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# Copyright 2020-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. # Amazon Nitro Enclaves (NE) support. # Nitro is a hypervisor that has been developed by Amazon. -# TODO: Add dependency for ARM64 once NE is supported on Arm platforms. For now, -# the NE kernel driver can be built for aarch64 arch. -# depends on (ARM64 || X86) && HOTPLUG_CPU && PCI && SMP - config NITRO_ENCLAVES tristate "Nitro Enclaves Support" - depends on X86 && HOTPLUG_CPU && PCI && SMP + depends on (ARM64 || X86) && HOTPLUG_CPU && PCI && SMP help This driver consists of support for enclave lifetime management for Nitro Enclaves (NE). From patchwork Fri Aug 27 13:32:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Paraschiv, Andra-Irina" X-Patchwork-Id: 12462159 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=-19.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham 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 1A3F6C4320A for ; Fri, 27 Aug 2021 13:33:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 009B960E78 for ; Fri, 27 Aug 2021 13:33:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245261AbhH0Ndy (ORCPT ); Fri, 27 Aug 2021 09:33:54 -0400 Received: from smtp-fw-9102.amazon.com ([207.171.184.29]:29004 "EHLO smtp-fw-9102.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245275AbhH0Ndx (ORCPT ); Fri, 27 Aug 2021 09:33:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1630071185; x=1661607185; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=13gdSUSTjJs/ViYAWMGsJ2rsmzPqo9NDHMscb4elG0s=; b=ApROaPDB3Wzrq2ueRqBM5ldPw1PovIwvgw16MFqDcHcLxffMjjbLDrva B7xOqyP8KGcK22MJMtOyTAmEkKdg0htfBp4JbNKLniRml0jeh8f614tVX zW63Hu4YSBPiCs7DeerqnSSSL+Rode3pyI00u6J51JeYEt7/5uyyA5H0G 8=; X-IronPort-AV: E=Sophos;i="5.84,356,1620691200"; d="scan'208";a="155617234" Received: from pdx4-co-svc-p1-lb2-vlan3.amazon.com (HELO email-inbound-relay-2b-5bdc5131.us-west-2.amazon.com) ([10.25.36.214]) by smtp-border-fw-9102.sea19.amazon.com with ESMTP; 27 Aug 2021 13:32:57 +0000 Received: from EX13D16EUB003.ant.amazon.com (pdx1-ws-svc-p6-lb9-vlan3.pdx.amazon.com [10.236.137.198]) by email-inbound-relay-2b-5bdc5131.us-west-2.amazon.com (Postfix) with ESMTPS id 9615DA262C; Fri, 27 Aug 2021 13:32:55 +0000 (UTC) Received: from 38f9d34ed3b1.ant.amazon.com (10.43.161.176) by EX13D16EUB003.ant.amazon.com (10.43.166.99) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Fri, 27 Aug 2021 13:32:49 +0000 From: Andra Paraschiv To: linux-kernel CC: Alexandru Ciobotaru , Greg KH , Kamal Mostafa , "Alexandru Vasile" , Paolo Bonzini , "Stefano Garzarella" , Stefan Hajnoczi , Vitaly Kuznetsov , kvm , ne-devel-upstream , Andra Paraschiv Subject: [PATCH v2 2/7] nitro_enclaves: Update documentation for Arm64 support Date: Fri, 27 Aug 2021 16:32:25 +0300 Message-ID: <20210827133230.29816-3-andraprs@amazon.com> X-Mailer: git-send-email 2.20.1 (Apple Git-117) In-Reply-To: <20210827133230.29816-1-andraprs@amazon.com> References: <20210827133230.29816-1-andraprs@amazon.com> MIME-Version: 1.0 X-Originating-IP: [10.43.161.176] X-ClientProxiedBy: EX13d09UWA004.ant.amazon.com (10.43.160.158) To EX13D16EUB003.ant.amazon.com (10.43.166.99) Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Add references for hugepages and booting steps for Arm64. Include info about the current supported architectures for the NE kernel driver. Changelog v1 -> v2 * Add information about supported architectures for the NE kernel driver. Signed-off-by: Andra Paraschiv --- Documentation/virt/ne_overview.rst | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/Documentation/virt/ne_overview.rst b/Documentation/virt/ne_overview.rst index 39b0c8fe2654a..74c2f5919c886 100644 --- a/Documentation/virt/ne_overview.rst +++ b/Documentation/virt/ne_overview.rst @@ -14,12 +14,15 @@ instances [1]. For example, an application that processes sensitive data and runs in a VM, can be separated from other applications running in the same VM. This application then runs in a separate VM than the primary VM, namely an enclave. +It runs alongside the VM that spawned it. This setup matches low latency +applications needs. -An enclave runs alongside the VM that spawned it. This setup matches low latency -applications needs. The resources that are allocated for the enclave, such as -memory and CPUs, are carved out of the primary VM. Each enclave is mapped to a -process running in the primary VM, that communicates with the NE driver via an -ioctl interface. +The current supported architectures for the NE kernel driver, available in the +upstream Linux kernel, are x86 and ARM64. + +The resources that are allocated for the enclave, such as memory and CPUs, are +carved out of the primary VM. Each enclave is mapped to a process running in the +primary VM, that communicates with the NE kernel driver via an ioctl interface. In this sense, there are two components: @@ -43,8 +46,8 @@ for the enclave VM. An enclave does not have persistent storage attached. The memory regions carved out of the primary VM and given to an enclave need to be aligned 2 MiB / 1 GiB physically contiguous memory regions (or multiple of this size e.g. 8 MiB). The memory can be allocated e.g. by using hugetlbfs from -user space [2][3]. The memory size for an enclave needs to be at least 64 MiB. -The enclave memory and CPUs need to be from the same NUMA node. +user space [2][3][7]. The memory size for an enclave needs to be at least +64 MiB. The enclave memory and CPUs need to be from the same NUMA node. An enclave runs on dedicated cores. CPU 0 and its CPU siblings need to remain available for the primary VM. A CPU pool has to be set for NE purposes by an @@ -61,7 +64,7 @@ device is placed in memory below the typical 4 GiB. The application that runs in the enclave needs to be packaged in an enclave image together with the OS ( e.g. kernel, ramdisk, init ) that will run in the enclave VM. The enclave VM has its own kernel and follows the standard Linux -boot protocol [6]. +boot protocol [6][8]. 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 @@ -93,3 +96,5 @@ enclave process can exit. [4] https://www.kernel.org/doc/html/latest/admin-guide/kernel-parameters.html [5] https://man7.org/linux/man-pages/man7/vsock.7.html [6] https://www.kernel.org/doc/html/latest/x86/boot.html +[7] https://www.kernel.org/doc/html/latest/arm64/hugetlbpage.html +[8] https://www.kernel.org/doc/html/latest/arm64/booting.html From patchwork Fri Aug 27 13:32:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Paraschiv, Andra-Irina" X-Patchwork-Id: 12462157 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=-19.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham 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 62769C43214 for ; Fri, 27 Aug 2021 13:33:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4CE3C601FD for ; Fri, 27 Aug 2021 13:33:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245266AbhH0Ndw (ORCPT ); Fri, 27 Aug 2021 09:33:52 -0400 Received: from smtp-fw-9103.amazon.com ([207.171.188.200]:37455 "EHLO smtp-fw-9103.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245247AbhH0Ndv (ORCPT ); Fri, 27 Aug 2021 09:33:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1630071182; x=1661607182; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=DLGQ8FV4uLF3688qqMzcwYQpXuVX6E8NOg0dFy56eJI=; b=Isjmq/a/typfrikmGCtML6S4CsrOGKwpktTYzoLACMuUZg0PD/tMnDOa peRebMarvM1DtRy0K4vhv3DtWDhjG9EmPECeDvVuV/Tkt5ZghiTjj4uTV ZC8pai1BuLgjQjPSTwyTwVzWULgCN6o/m+rD3zmtDliIRTO4B1sfyK0OC k=; X-IronPort-AV: E=Sophos;i="5.84,356,1620691200"; d="scan'208";a="953537455" Received: from pdx4-co-svc-p1-lb2-vlan2.amazon.com (HELO email-inbound-relay-2a-6e2fc477.us-west-2.amazon.com) ([10.25.36.210]) by smtp-border-fw-9103.sea19.amazon.com with ESMTP; 27 Aug 2021 13:33:01 +0000 Received: from EX13D16EUB003.ant.amazon.com (pdx1-ws-svc-p6-lb9-vlan2.pdx.amazon.com [10.236.137.194]) by email-inbound-relay-2a-6e2fc477.us-west-2.amazon.com (Postfix) with ESMTPS id 6314AA1785; Fri, 27 Aug 2021 13:33:01 +0000 (UTC) Received: from 38f9d34ed3b1.ant.amazon.com (10.43.161.176) by EX13D16EUB003.ant.amazon.com (10.43.166.99) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Fri, 27 Aug 2021 13:32:54 +0000 From: Andra Paraschiv To: linux-kernel CC: Alexandru Ciobotaru , Greg KH , Kamal Mostafa , "Alexandru Vasile" , Paolo Bonzini , "Stefano Garzarella" , Stefan Hajnoczi , Vitaly Kuznetsov , kvm , ne-devel-upstream , Andra Paraschiv Subject: [PATCH v2 3/7] nitro_enclaves: Add fix for the kernel-doc report Date: Fri, 27 Aug 2021 16:32:26 +0300 Message-ID: <20210827133230.29816-4-andraprs@amazon.com> X-Mailer: git-send-email 2.20.1 (Apple Git-117) In-Reply-To: <20210827133230.29816-1-andraprs@amazon.com> References: <20210827133230.29816-1-andraprs@amazon.com> MIME-Version: 1.0 X-Originating-IP: [10.43.161.176] X-ClientProxiedBy: EX13d09UWA004.ant.amazon.com (10.43.160.158) To EX13D16EUB003.ant.amazon.com (10.43.166.99) Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Fix the reported issue from the kernel-doc script, to have a comment per identifier. Changelog v1 -> v2 * Update comments for send / receive buffer sizes for the NE PCI device. Signed-off-by: Andra Paraschiv --- drivers/virt/nitro_enclaves/ne_pci_dev.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/virt/nitro_enclaves/ne_pci_dev.h b/drivers/virt/nitro_enclaves/ne_pci_dev.h index 8bfbc66078185..6e9f28971a4e0 100644 --- a/drivers/virt/nitro_enclaves/ne_pci_dev.h +++ b/drivers/virt/nitro_enclaves/ne_pci_dev.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0 */ /* - * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2020-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ #ifndef _NE_PCI_DEV_H_ @@ -84,9 +84,13 @@ */ /** - * NE_SEND_DATA_SIZE / NE_RECV_DATA_SIZE - 240 bytes for send / recv buffer. + * NE_SEND_DATA_SIZE - Size of the send buffer, in bytes. */ #define NE_SEND_DATA_SIZE (240) + +/** + * NE_RECV_DATA_SIZE - Size of the receive buffer, in bytes. + */ #define NE_RECV_DATA_SIZE (240) /** From patchwork Fri Aug 27 13:32:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Paraschiv, Andra-Irina" X-Patchwork-Id: 12462161 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=-19.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=unavailable 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 9E062C432BE for ; Fri, 27 Aug 2021 13:33:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7E9F860FD9 for ; Fri, 27 Aug 2021 13:33:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245285AbhH0NeI (ORCPT ); Fri, 27 Aug 2021 09:34:08 -0400 Received: from smtp-fw-2101.amazon.com ([72.21.196.25]:64878 "EHLO smtp-fw-2101.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245203AbhH0NeG (ORCPT ); Fri, 27 Aug 2021 09:34:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1630071198; x=1661607198; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=sBzr2CeY7ACFK2hNXkpZR3uy9YkRYqZ77qIzRjvkoEU=; b=YOBoYZYLCBOuzl5HJIxrfLejt7Z5tVmweVm4rXLBHRb3Ix2KxsUdRXlP eJho+ox6+8C25+KvPlqkR7rhUdc07XVjv5cLvK2ii0w4/D8hLLZxEnYNi iuAWxene0lXGjuikpPPdrlU6ok8TKGV1bfNQmCzIHj5pfrhwS9FVsLP0i Q=; X-IronPort-AV: E=Sophos;i="5.84,356,1620691200"; d="scan'208";a="132732140" Received: from iad12-co-svc-p1-lb1-vlan2.amazon.com (HELO email-inbound-relay-2a-538b0bfb.us-west-2.amazon.com) ([10.43.8.2]) by smtp-border-fw-2101.iad2.amazon.com with ESMTP; 27 Aug 2021 13:33:09 +0000 Received: from EX13D16EUB003.ant.amazon.com (pdx1-ws-svc-p6-lb9-vlan3.pdx.amazon.com [10.236.137.198]) by email-inbound-relay-2a-538b0bfb.us-west-2.amazon.com (Postfix) with ESMTPS id A9958A1DE3; Fri, 27 Aug 2021 13:33:08 +0000 (UTC) Received: from 38f9d34ed3b1.ant.amazon.com (10.43.161.176) by EX13D16EUB003.ant.amazon.com (10.43.166.99) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Fri, 27 Aug 2021 13:33:00 +0000 From: Andra Paraschiv To: linux-kernel CC: Alexandru Ciobotaru , Greg KH , Kamal Mostafa , "Alexandru Vasile" , Paolo Bonzini , "Stefano Garzarella" , Stefan Hajnoczi , Vitaly Kuznetsov , kvm , ne-devel-upstream , Andra Paraschiv Subject: [PATCH v2 4/7] nitro_enclaves: Update copyright statement to include 2021 Date: Fri, 27 Aug 2021 16:32:27 +0300 Message-ID: <20210827133230.29816-5-andraprs@amazon.com> X-Mailer: git-send-email 2.20.1 (Apple Git-117) In-Reply-To: <20210827133230.29816-1-andraprs@amazon.com> References: <20210827133230.29816-1-andraprs@amazon.com> MIME-Version: 1.0 X-Originating-IP: [10.43.161.176] X-ClientProxiedBy: EX13d09UWA004.ant.amazon.com (10.43.160.158) To EX13D16EUB003.ant.amazon.com (10.43.166.99) Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Update the copyright statement to include 2021, as a change has been made over this year. Check commit d874742f6a73 ("nitro_enclaves: Set Bus Master for the NE PCI device") for the codebase update from this file (ne_pci_dev.c). Changelog v1 -> v2 * No codebase changes, it was split from the patch 3 in the v1 of the patch series. Signed-off-by: Andra Paraschiv --- drivers/virt/nitro_enclaves/ne_pci_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/virt/nitro_enclaves/ne_pci_dev.c b/drivers/virt/nitro_enclaves/ne_pci_dev.c index 143207e9b9698..40b49ec8e30b1 100644 --- a/drivers/virt/nitro_enclaves/ne_pci_dev.c +++ b/drivers/virt/nitro_enclaves/ne_pci_dev.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 /* - * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2020-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ /** From patchwork Fri Aug 27 13:32:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Paraschiv, Andra-Irina" X-Patchwork-Id: 12462163 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=-19.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham 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 C989FC4320A for ; Fri, 27 Aug 2021 13:33:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A19AD60FD9 for ; Fri, 27 Aug 2021 13:33:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245303AbhH0NeO (ORCPT ); Fri, 27 Aug 2021 09:34:14 -0400 Received: from smtp-fw-6001.amazon.com ([52.95.48.154]:24439 "EHLO smtp-fw-6001.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245304AbhH0NeL (ORCPT ); Fri, 27 Aug 2021 09:34:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1630071203; x=1661607203; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=EEu3FYMRr+q81t6fu5GQ4KYQRiWxMXDTwSHjx1OG3e4=; b=V/ZPigkqf289X5wRGMDNJPgr9W3rKOS08g/3y/qT+WtpSKk40g2nOLLR px2xQVOUqeymaL6OXn9FdgE677htmeL6C/Z+21SxlNurZYLRXX3Iga3Rf KYiZa3pGCbXh+SxaOa+Q2+l7Ah8qN+k1HuCq01uCo+o91oH/5rTmvI7gL A=; X-IronPort-AV: E=Sophos;i="5.84,356,1620691200"; d="scan'208";a="137217143" Received: from iad12-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-2c-c6afef2e.us-west-2.amazon.com) ([10.43.8.6]) by smtp-border-fw-6001.iad6.amazon.com with ESMTP; 27 Aug 2021 13:33:22 +0000 Received: from EX13D16EUB003.ant.amazon.com (pdx1-ws-svc-p6-lb9-vlan2.pdx.amazon.com [10.236.137.194]) by email-inbound-relay-2c-c6afef2e.us-west-2.amazon.com (Postfix) with ESMTPS id 6BF85A0AE8; Fri, 27 Aug 2021 13:33:20 +0000 (UTC) Received: from 38f9d34ed3b1.ant.amazon.com (10.43.162.52) by EX13D16EUB003.ant.amazon.com (10.43.166.99) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Fri, 27 Aug 2021 13:33:13 +0000 From: Andra Paraschiv To: linux-kernel CC: Alexandru Ciobotaru , Greg KH , Kamal Mostafa , "Alexandru Vasile" , Paolo Bonzini , "Stefano Garzarella" , Stefan Hajnoczi , Vitaly Kuznetsov , kvm , ne-devel-upstream , Andra Paraschiv Subject: [PATCH v2 5/7] nitro_enclaves: Add fixes for checkpatch match open parenthesis reports Date: Fri, 27 Aug 2021 16:32:28 +0300 Message-ID: <20210827133230.29816-6-andraprs@amazon.com> X-Mailer: git-send-email 2.20.1 (Apple Git-117) In-Reply-To: <20210827133230.29816-1-andraprs@amazon.com> References: <20210827133230.29816-1-andraprs@amazon.com> MIME-Version: 1.0 X-Originating-IP: [10.43.162.52] X-ClientProxiedBy: EX13D43UWA002.ant.amazon.com (10.43.160.109) To EX13D16EUB003.ant.amazon.com (10.43.166.99) Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Update the codebase formatting to fix the reports from the checkpatch script, to match the open parenthesis. Changelog v1 -> v2 * No codebase changes, it was split from the patch 3 in the v1 of the patch series. Signed-off-by: Andra Paraschiv --- drivers/virt/nitro_enclaves/ne_misc_dev.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/virt/nitro_enclaves/ne_misc_dev.c b/drivers/virt/nitro_enclaves/ne_misc_dev.c index e21e1e86ad15f..8939612ee0e08 100644 --- a/drivers/virt/nitro_enclaves/ne_misc_dev.c +++ b/drivers/virt/nitro_enclaves/ne_misc_dev.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 /* - * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2020-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ /** @@ -284,8 +284,8 @@ static int ne_setup_cpu_pool(const char *ne_cpu_list) ne_cpu_pool.nr_parent_vm_cores = nr_cpu_ids / ne_cpu_pool.nr_threads_per_core; ne_cpu_pool.avail_threads_per_core = kcalloc(ne_cpu_pool.nr_parent_vm_cores, - sizeof(*ne_cpu_pool.avail_threads_per_core), - GFP_KERNEL); + sizeof(*ne_cpu_pool.avail_threads_per_core), + GFP_KERNEL); if (!ne_cpu_pool.avail_threads_per_core) { rc = -ENOMEM; @@ -735,7 +735,7 @@ static int ne_add_vcpu_ioctl(struct ne_enclave *ne_enclave, u32 vcpu_id) * * Negative return value on failure. */ static int ne_sanity_check_user_mem_region(struct ne_enclave *ne_enclave, - struct ne_user_memory_region mem_region) + struct ne_user_memory_region mem_region) { struct ne_mem_region *ne_mem_region = NULL; @@ -771,7 +771,7 @@ static int ne_sanity_check_user_mem_region(struct ne_enclave *ne_enclave, u64 userspace_addr = ne_mem_region->userspace_addr; if ((userspace_addr <= mem_region.userspace_addr && - mem_region.userspace_addr < (userspace_addr + memory_size)) || + mem_region.userspace_addr < (userspace_addr + memory_size)) || (mem_region.userspace_addr <= userspace_addr && (mem_region.userspace_addr + mem_region.memory_size) > userspace_addr)) { dev_err_ratelimited(ne_misc_dev.this_device, @@ -836,7 +836,7 @@ static int ne_sanity_check_user_mem_region_page(struct ne_enclave *ne_enclave, * * Negative return value on failure. */ static int ne_set_user_memory_region_ioctl(struct ne_enclave *ne_enclave, - struct ne_user_memory_region mem_region) + struct ne_user_memory_region mem_region) { long gup_rc = 0; unsigned long i = 0; @@ -1014,7 +1014,7 @@ static int ne_set_user_memory_region_ioctl(struct ne_enclave *ne_enclave, * * Negative return value on failure. */ static int ne_start_enclave_ioctl(struct ne_enclave *ne_enclave, - struct ne_enclave_start_info *enclave_start_info) + struct ne_enclave_start_info *enclave_start_info) { struct ne_pci_dev_cmd_reply cmd_reply = {}; unsigned int cpu = 0; @@ -1574,7 +1574,8 @@ static int ne_create_vm_ioctl(struct ne_pci_dev *ne_pci_dev, u64 __user *slot_ui mutex_unlock(&ne_cpu_pool.mutex); ne_enclave->threads_per_core = kcalloc(ne_enclave->nr_parent_vm_cores, - sizeof(*ne_enclave->threads_per_core), GFP_KERNEL); + sizeof(*ne_enclave->threads_per_core), + GFP_KERNEL); if (!ne_enclave->threads_per_core) { rc = -ENOMEM; From patchwork Fri Aug 27 13:32:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Paraschiv, Andra-Irina" X-Patchwork-Id: 12462165 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=-19.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham 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 30AFBC432BE for ; Fri, 27 Aug 2021 13:33:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0C83560E78 for ; Fri, 27 Aug 2021 13:33:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245340AbhH0NeS (ORCPT ); Fri, 27 Aug 2021 09:34:18 -0400 Received: from smtp-fw-6001.amazon.com ([52.95.48.154]:24564 "EHLO smtp-fw-6001.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245299AbhH0NeR (ORCPT ); Fri, 27 Aug 2021 09:34:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1630071209; x=1661607209; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=kHebWcaTe5iAVHkkg40aCcznXhYBts4+VmWf/Kg1ipM=; b=dk0yVjoJlekPDpZegk2HNBxofSOYcwbWwoxZ4zgLKK8RA/rG2EIPMfGP tZGc5cfhh7B3lV4mEVQcHJ0APX9COe4N5Kj8WSgE9vhXyE7Qbiy1Ne7ql RftZ0/nzZ2VS6scI0gdFDLKcBTbWr6fM4uUoF1Ypqsk/mXJDw4uLXnqGN 0=; X-IronPort-AV: E=Sophos;i="5.84,356,1620691200"; d="scan'208";a="137217159" Received: from iad12-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-2b-4e24fd92.us-west-2.amazon.com) ([10.43.8.6]) by smtp-border-fw-6001.iad6.amazon.com with ESMTP; 27 Aug 2021 13:33:28 +0000 Received: from EX13D16EUB003.ant.amazon.com (pdx1-ws-svc-p6-lb9-vlan2.pdx.amazon.com [10.236.137.194]) by email-inbound-relay-2b-4e24fd92.us-west-2.amazon.com (Postfix) with ESMTPS id C1539A2288; Fri, 27 Aug 2021 13:33:26 +0000 (UTC) Received: from 38f9d34ed3b1.ant.amazon.com (10.43.162.52) by EX13D16EUB003.ant.amazon.com (10.43.166.99) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Fri, 27 Aug 2021 13:33:19 +0000 From: Andra Paraschiv To: linux-kernel CC: Alexandru Ciobotaru , Greg KH , Kamal Mostafa , "Alexandru Vasile" , Paolo Bonzini , "Stefano Garzarella" , Stefan Hajnoczi , Vitaly Kuznetsov , kvm , ne-devel-upstream , Andra Paraschiv Subject: [PATCH v2 6/7] nitro_enclaves: Add fixes for checkpatch spell check reports Date: Fri, 27 Aug 2021 16:32:29 +0300 Message-ID: <20210827133230.29816-7-andraprs@amazon.com> X-Mailer: git-send-email 2.20.1 (Apple Git-117) In-Reply-To: <20210827133230.29816-1-andraprs@amazon.com> References: <20210827133230.29816-1-andraprs@amazon.com> MIME-Version: 1.0 X-Originating-IP: [10.43.162.52] X-ClientProxiedBy: EX13D43UWA002.ant.amazon.com (10.43.160.109) To EX13D16EUB003.ant.amazon.com (10.43.166.99) Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Fix the typos in the words spelling as per the checkpatch script reports. Changelog v1 -> v2 * No codebase changes, it was split from the patch 3 in the v1 of the patch series. Signed-off-by: Andra Paraschiv --- include/uapi/linux/nitro_enclaves.h | 10 +++++----- samples/nitro_enclaves/ne_ioctl_sample.c | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/uapi/linux/nitro_enclaves.h b/include/uapi/linux/nitro_enclaves.h index b945073fe544d..e808f5ba124d4 100644 --- a/include/uapi/linux/nitro_enclaves.h +++ b/include/uapi/linux/nitro_enclaves.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ /* - * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2020-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ #ifndef _UAPI_LINUX_NITRO_ENCLAVES_H_ @@ -60,7 +60,7 @@ * * Context: Process context. * Return: - * * 0 - Logic succesfully completed. + * * 0 - Logic successfully completed. * * -1 - There was a failure in the ioctl logic. * On failure, errno is set to: * * EFAULT - copy_from_user() / copy_to_user() failure. @@ -95,7 +95,7 @@ * * Context: Process context. * Return: - * * 0 - Logic succesfully completed. + * * 0 - Logic successfully completed. * * -1 - There was a failure in the ioctl logic. * On failure, errno is set to: * * EFAULT - copy_from_user() / copy_to_user() failure. @@ -118,7 +118,7 @@ * * Context: Process context. * Return: - * * 0 - Logic succesfully completed. + * * 0 - Logic successfully completed. * * -1 - There was a failure in the ioctl logic. * On failure, errno is set to: * * EFAULT - copy_from_user() failure. @@ -161,7 +161,7 @@ * * Context: Process context. * Return: - * * 0 - Logic succesfully completed. + * * 0 - Logic successfully completed. * * -1 - There was a failure in the ioctl logic. * On failure, errno is set to: * * EFAULT - copy_from_user() / copy_to_user() failure. diff --git a/samples/nitro_enclaves/ne_ioctl_sample.c b/samples/nitro_enclaves/ne_ioctl_sample.c index 480b763142b34..6a60990b2e202 100644 --- a/samples/nitro_enclaves/ne_ioctl_sample.c +++ b/samples/nitro_enclaves/ne_ioctl_sample.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 /* - * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2020-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ /** @@ -638,7 +638,7 @@ static int ne_start_enclave(int enclave_fd, struct ne_enclave_start_info *encla } /** - * ne_start_enclave_check_booted() - Start the enclave and wait for a hearbeat + * ne_start_enclave_check_booted() - Start the enclave and wait for a heartbeat * from it, on a newly created vsock channel, * to check it has booted. * @enclave_fd : The file descriptor associated with the enclave. From patchwork Fri Aug 27 13:32:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Paraschiv, Andra-Irina" X-Patchwork-Id: 12462167 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=-19.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham 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 304D3C432BE for ; Fri, 27 Aug 2021 13:33:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1195560FD9 for ; Fri, 27 Aug 2021 13:33:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245365AbhH0Ne2 (ORCPT ); Fri, 27 Aug 2021 09:34:28 -0400 Received: from smtp-fw-9102.amazon.com ([207.171.184.29]:29653 "EHLO smtp-fw-9102.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245360AbhH0NeV (ORCPT ); Fri, 27 Aug 2021 09:34:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1630071212; x=1661607212; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=XlrFOPsHVkGwuf5CGE9FaO4wRJO0d1CiINHk8dBhF/8=; b=MVXYpuFyKKJru/YR9nKSRMv3VvkVfblLVrVJkoJXcA0amto9q9359C7o u8Av7ywZukDMMNDVtIIBgOQ9KZsuTlh6vkJipRwq09WcAocBMdyskxYJT mXY6p+qS58E1FaSvNxOXpJGIHBsA06h6LIX5CqNQt2gj8loif65e3IRmW g=; X-IronPort-AV: E=Sophos;i="5.84,356,1620691200"; d="scan'208";a="155617338" Received: from pdx4-co-svc-p1-lb2-vlan3.amazon.com (HELO email-inbound-relay-2b-baacba05.us-west-2.amazon.com) ([10.25.36.214]) by smtp-border-fw-9102.sea19.amazon.com with ESMTP; 27 Aug 2021 13:33:32 +0000 Received: from EX13D16EUB003.ant.amazon.com (pdx1-ws-svc-p6-lb9-vlan2.pdx.amazon.com [10.236.137.194]) by email-inbound-relay-2b-baacba05.us-west-2.amazon.com (Postfix) with ESMTPS id 988FEA04DB; Fri, 27 Aug 2021 13:33:31 +0000 (UTC) Received: from 38f9d34ed3b1.ant.amazon.com (10.43.162.52) by EX13D16EUB003.ant.amazon.com (10.43.166.99) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Fri, 27 Aug 2021 13:33:25 +0000 From: Andra Paraschiv To: linux-kernel CC: Alexandru Ciobotaru , Greg KH , Kamal Mostafa , "Alexandru Vasile" , Paolo Bonzini , "Stefano Garzarella" , Stefan Hajnoczi , Vitaly Kuznetsov , kvm , ne-devel-upstream , Andra Paraschiv Subject: [PATCH v2 7/7] nitro_enclaves: Add fixes for checkpatch blank line reports Date: Fri, 27 Aug 2021 16:32:30 +0300 Message-ID: <20210827133230.29816-8-andraprs@amazon.com> X-Mailer: git-send-email 2.20.1 (Apple Git-117) In-Reply-To: <20210827133230.29816-1-andraprs@amazon.com> References: <20210827133230.29816-1-andraprs@amazon.com> MIME-Version: 1.0 X-Originating-IP: [10.43.162.52] X-ClientProxiedBy: EX13D43UWA002.ant.amazon.com (10.43.160.109) To EX13D16EUB003.ant.amazon.com (10.43.166.99) Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Remove blank lines that are not necessary, fixing the checkpatch script reports. While at it, add a blank line after the switch default block, similar to the other parts of the codebase. Changelog v1 -> v2 * No codebase changes, it was split from the patch 3 in the v1 of the patch series. Signed-off-by: Andra Paraschiv --- samples/nitro_enclaves/ne_ioctl_sample.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/samples/nitro_enclaves/ne_ioctl_sample.c b/samples/nitro_enclaves/ne_ioctl_sample.c index 6a60990b2e202..765b131c73190 100644 --- a/samples/nitro_enclaves/ne_ioctl_sample.c +++ b/samples/nitro_enclaves/ne_ioctl_sample.c @@ -185,7 +185,6 @@ static int ne_create_vm(int ne_dev_fd, unsigned long *slot_uid, int *enclave_fd) return 0; } - /** * ne_poll_enclave_fd() - Thread function for polling the enclave fd. * @data: Argument provided for the polling function. @@ -560,8 +559,8 @@ static int ne_add_vcpu(int enclave_fd, unsigned int *vcpu_id) default: printf("Error in add vcpu [%m]\n"); - } + return rc; }