From patchwork Thu Dec 2 13:16:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tim Gardner X-Patchwork-Id: 1562703 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=M8De7cWG; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4J4c1w4D9Gz9s1l for ; Fri, 3 Dec 2021 00:17:24 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1mslxd-00088n-1x; Thu, 02 Dec 2021 13:17:17 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1mslxb-000886-E1 for kernel-team@lists.ubuntu.com; Thu, 02 Dec 2021 13:17:15 +0000 Received: from mail-pj1-f72.google.com (mail-pj1-f72.google.com [209.85.216.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 1AD9C3F1F2 for ; Thu, 2 Dec 2021 13:17:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638451035; bh=dAs19Oppp63KDaeR9B1NiePkxjx5xPvH2cf7paOklQY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=M8De7cWG6taM1IFazg6hacZPIO0VSgRoh1I/GcK0t2FDGQJR8okm3lBsLk3/YBAtt 7+pToFgNg7FP+RBVbldraqcXUhMTJRqE0+/1MhUbeGBME7hXNl/CPKkbiIvy+F4tao bkQSOMSVSOwkbiyf8NjbNBsUN2q3U4TdTjgMATqdV8UEeKLnSdJVQvkbLCpb4lWMU7 PizRB4OO2kYTp9EZsAXVCt47RwYdSjeYBiVE5qWUH122dW5gBD8Iv/xlQdxYFIBeeC PDdTPPoVMYajnChgk7q5SlL0yAHlKeFwXZVSer6JPPqiyY6RJKJPATVl3F1ee+YmqS V1aUkUWrc05pA== Received: by mail-pj1-f72.google.com with SMTP id bf17-20020a17090b0b1100b001a634dbd737so1945475pjb.9 for ; Thu, 02 Dec 2021 05:17:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dAs19Oppp63KDaeR9B1NiePkxjx5xPvH2cf7paOklQY=; b=foBO+YiBMdu5JzNe1d0fCQd4qPA7vcT3fEkAh/Tdntg6VcloPk39C5n8oL+SnPP8ub Ik5JUfT18yyVZCnFzAkrL0Y3inbfA0z8n2CkBTuqHcu9xumETpe8EaQrAoieTIfzq6zg VpCahsy7dafpkD2+LY7pCC3RIIw4sxqN79gj4Z4yTGOY1k4GMpPJvlic2REZbE6az8dd KYDYDbtYaopRDtPg2Lk6aRHhSZyM6J13q7vrav7PArM2yHNNSS0zCHApPVfBWbrnfZoB i6fgcnpxhC8EwePMLsa03fFm9tCIwsZ/lb54m+ekzzmiSg9KgU+ze6LsiBExGl0OiwZt 0Sag== X-Gm-Message-State: AOAM5334wHyXUee7c+oiOPNCC2bQdYL40e/szAEp9A03TpZTKWAHonT4 nfMQBu5xTv9OZFv7f2ICEV01OZBLnXOZubxmPEnH72haTA3C+Qfr8AUWP1IpPKmKvR9PyFxwCjn gRhtdutVpYZcDTZN1Gooq7eta7bW7SaXvH6iGWotsYw== X-Received: by 2002:a65:6243:: with SMTP id q3mr6777708pgv.593.1638451033371; Thu, 02 Dec 2021 05:17:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJyZgZv8TMpDvYeFq3vNun9D4M5SCp5YB8WVXMvr/wnE8SMCqK8A5qkhU2CxC+BDRizgAHNntw== X-Received: by 2002:a65:6243:: with SMTP id q3mr6777692pgv.593.1638451033156; Thu, 02 Dec 2021 05:17:13 -0800 (PST) Received: from localhost.localdomain ([69.163.84.166]) by smtp.gmail.com with ESMTPSA id mi18sm2820019pjb.13.2021.12.02.05.17.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Dec 2021 05:17:12 -0800 (PST) From: Tim Gardner To: kernel-team@lists.ubuntu.com Subject: [PATCH 1/8] nitro_enclaves: Set Bus Master for the NE PCI device Date: Thu, 2 Dec 2021 06:16:58 -0700 Message-Id: <20211202131705.9536-2-tim.gardner@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211202131705.9536-1-tim.gardner@canonical.com> References: <20211202131705.9536-1-tim.gardner@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: "Longpeng(Mike)" BugLink: https://bugs.launchpad.net/bugs/1951873 Enable Bus Master for the NE PCI device, according to the PCI spec for submitting memory or I/O requests: Master Enable – Controls the ability of a PCI Express Endpoint to issue Memory and I/O Read/Write Requests, and the ability of a Root or Switch Port to forward Memory and I/O Read/Write Requests in the Upstream direction Cc: Andra Paraschiv Cc: Alexandru Vasile Cc: Alexandru Ciobotaru Reviewed-by: Andra Paraschiv Signed-off-by: Longpeng(Mike) Link: https://lore.kernel.org/r/20210621004046.1419-1-longpeng2@huawei.com Signed-off-by: Greg Kroah-Hartman (cherry picked from commit d874742f6a734c73c22235f9d56b8f10bcf17c5f) Signed-off-by: Tim Gardner --- drivers/virt/nitro_enclaves/ne_pci_dev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/virt/nitro_enclaves/ne_pci_dev.c b/drivers/virt/nitro_enclaves/ne_pci_dev.c index b9c1de41e300..143207e9b969 100644 --- a/drivers/virt/nitro_enclaves/ne_pci_dev.c +++ b/drivers/virt/nitro_enclaves/ne_pci_dev.c @@ -480,6 +480,8 @@ static int ne_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) goto free_ne_pci_dev; } + pci_set_master(pdev); + rc = pci_request_regions_exclusive(pdev, "nitro_enclaves"); if (rc < 0) { dev_err(&pdev->dev, "Error in pci request regions [rc=%d]\n", rc); From patchwork Thu Dec 2 13:16:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Gardner X-Patchwork-Id: 1562704 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=oiW2r76A; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4J4c200VbPz9s1l for ; Fri, 3 Dec 2021 00:17:28 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1mslxe-0008A2-RU; Thu, 02 Dec 2021 13:17:18 +0000 Received: from smtp-relay-internal-1.internal ([10.131.114.114] helo=smtp-relay-internal-1.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1mslxc-00088U-HT for kernel-team@lists.ubuntu.com; Thu, 02 Dec 2021 13:17:16 +0000 Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id EE1E23F1B2 for ; Thu, 2 Dec 2021 13:17:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638451035; bh=Q3+HxD472D2nmmx+zsnUJnq5DaYonj6QF6L04KG3GHY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=oiW2r76Ae1/nqWjSxpdMWGYqFO1GbyJHwb4qhKIgCnF6hNWqBj9d109kJINag1jsj 3bk3LUOeZSNWRsxzjPeo3LD8NsET4a6rDIWvaINktbMjfnBFZ5uq5YngmnPQo6+KAd vmUW8lxifdObY/i0+YAaRzyatbciSttozlRk0uCzRKnUe0sE4DRXO+FUfNIJij4Z3k le8EAz6dPJIN7d32zJgmuYJ0IF7s4SRoi25ShXjrMdxv4/5/SbV7XMwTuyzUCjwpgj aXu27F7hNWMhYAmG++56Ws7IGMFRl5xaRTALJeeIgUgjaWzaDZX0/rGLjVOwxUvdVr KEZf7OHg3mObg== Received: by mail-pl1-f199.google.com with SMTP id e10-20020a17090301ca00b00141fbe2569dso11648087plh.14 for ; Thu, 02 Dec 2021 05:17:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Q3+HxD472D2nmmx+zsnUJnq5DaYonj6QF6L04KG3GHY=; b=tXEACh52RuRAlK/3LJYX2lcXxTWYpJvIPOnIs02Du/D/WRXgxDUN4E5WuJp6o45Odx fY+MuewQrF4GtuFqcIOUky4vjdSKwtBhJaxHsWJdNvDviRRe0+i1BQaErvdjXu/da3L1 /UtrEH6Cj0tJlXL1a1SNQDqIeKpEpTmDw8fWsybkKnUM0rO83KyEHbniCg0g3hgFy8Z4 fhafxnmW8YMcGdEp1oJ1dqpJ0mm8YpB4VmPhxWwJEN8csVqqNwGyl9hcnUdZQE7Hh2hG Z7SRao3xzwo0A+Lswikle6sNpW2NSbMDy0dTdWnM1eHS43y5Ev4AvB43UCGtPm2aj1jk CmDA== X-Gm-Message-State: AOAM533ZDfr3uLmNxkNyhAzPmZKFGVF+kEQeqdBjc2raz1yJYXvj3+W1 xl0FHcZfrFfgj0nVpFm+IergSkE7o9w+mqLEXndxVdpR0avqXL2G4WVJTbe3JGloWHMQ41nbmPk U8/6g+BIV+a2B8T8DtQZNWDHZ8HpyMQqcM0tXlzHDKQ== X-Received: by 2002:a05:6a00:10c5:b0:49f:de2c:1b23 with SMTP id d5-20020a056a0010c500b0049fde2c1b23mr12397460pfu.41.1638451034365; Thu, 02 Dec 2021 05:17:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJy3Yr9k3LaKmA3GgfUIPv9aSDtPMp+X7wlGSnqxE0oRFxyzhY9R2REkbYA510AGPerPoY/JUA== X-Received: by 2002:a05:6a00:10c5:b0:49f:de2c:1b23 with SMTP id d5-20020a056a0010c500b0049fde2c1b23mr12397438pfu.41.1638451034154; Thu, 02 Dec 2021 05:17:14 -0800 (PST) Received: from localhost.localdomain ([69.163.84.166]) by smtp.gmail.com with ESMTPSA id mi18sm2820019pjb.13.2021.12.02.05.17.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Dec 2021 05:17:13 -0800 (PST) From: Tim Gardner To: kernel-team@lists.ubuntu.com Subject: [PATCH 2/8] nitro_enclaves: Enable Arm64 support Date: Thu, 2 Dec 2021 06:16:59 -0700 Message-Id: <20211202131705.9536-3-tim.gardner@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211202131705.9536-1-tim.gardner@canonical.com> References: <20211202131705.9536-1-tim.gardner@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Andra Paraschiv BugLink: https://bugs.launchpad.net/bugs/1951873 Update the kernel config to enable the Nitro Enclaves kernel driver for Arm64 support. Reviewed-by: George-Aurelian Popescu Acked-by: Stefano Garzarella Signed-off-by: Andra Paraschiv Link: https://lore.kernel.org/r/20210827154930.40608-2-andraprs@amazon.com Signed-off-by: Greg Kroah-Hartman (cherry picked from commit f7e55f05301e71af557c45224817438670225aa7) Signed-off-by: Tim Gardner --- 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 8c9387a232df..f53740b941c0 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 Thu Dec 2 13:17:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Gardner X-Patchwork-Id: 1562705 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=Nys42uUx; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4J4c215bJ3z9s1l for ; Fri, 3 Dec 2021 00:17:29 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1mslxg-0008As-2h; Thu, 02 Dec 2021 13:17:20 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1mslxd-000892-PT for kernel-team@lists.ubuntu.com; Thu, 02 Dec 2021 13:17:17 +0000 Received: from mail-pg1-f199.google.com (mail-pg1-f199.google.com [209.85.215.199]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 4E1643F1F2 for ; Thu, 2 Dec 2021 13:17:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638451037; bh=5TG5mAHFUkZm+5l/uVLtvJGZbjuCZEh99Q7y9+CRV1w=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Nys42uUxHF/Ss2sh+ECjtcnkJWomJOTxgjsZm3XiTj7D1NBicWZxdxW5mMGryJOYc noiM/YrmxmHK6xXQOuLRWn6bDl2W9sZ4vHATFqPAHulRdH7yZYcCs6FgOYd72go7eh EK/pAm6PUHmAaEJEB1S72s42yE5zLBH2Q+3ulNgi+PYQs8OPPID2HvzQczxSDSsEmg JUTrToZZhFfUM3cyHRVOEuC385v7+WniDjYt4iFBoBKRFQYAGhTdn2HopcUIebOCeD r4DypQc6GxiFolY1eMXxNUxsCQZ/FzJnUpZ740phZ8a6itURUXqVfvR52a6juPqWt7 pGVIS4aarEVNg== Received: by mail-pg1-f199.google.com with SMTP id 141-20020a630793000000b003214e421b2cso14108253pgh.5 for ; Thu, 02 Dec 2021 05:17:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5TG5mAHFUkZm+5l/uVLtvJGZbjuCZEh99Q7y9+CRV1w=; b=y1zEIf9VO7LkffLraxJW+SLIb59vb+gOtYFqPfSOr3D81dSJYm1MYTZdMJoOS5JD6e UpqrPr2cc3+SNQsxrtXYm221YCF545Lm3tkUnjqtAzDI/GpJFdPP3aO+9S3yowRf5QKN LyTg3NHRrOKuEBF1/yyc9LyeTsfloltuiPBTQGHld/mo1qZx7EnOzr0ZXtYyDZ+KxEk3 QSeTSza0VzrJqYMZipeD+LUYPsVEIg0EsqH5vdGw7n5M3xnpt7CBCO1YK3f6SqtdnPaI 4OWZjssmE9tblDLs8NR7Y0OiHQzKjgKWaL/TYIxJHkQR5sbPM0CXvizzUk1UK0vHp/me sIYw== X-Gm-Message-State: AOAM533U42o+aLZcjeIIK4gHqrP6ZBZxFfUVPLNanm5VjdqfOsqxUjYZ CmwHA1Iv/g1VlBtJqDchWvfQxvNg5fd4oeEFXikCI+dEgNKJ9ne5jEp0D67StY1wIbCQcOCQgIq yvaIp4pFdP7o+9mfN2u+ZT/+PCqMkUZna9HrIdq4hMA== X-Received: by 2002:a05:6a00:1312:b0:4a4:e341:213a with SMTP id j18-20020a056a00131200b004a4e341213amr12423447pfu.57.1638451035447; Thu, 02 Dec 2021 05:17:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJxJpRdrgS3jyVP4yw5LrOvXISHYetK1ve32jJnLxPZGFvFxsSk9M6iLd5cVhlvkRU8evXDi8Q== X-Received: by 2002:a05:6a00:1312:b0:4a4:e341:213a with SMTP id j18-20020a056a00131200b004a4e341213amr12423421pfu.57.1638451035161; Thu, 02 Dec 2021 05:17:15 -0800 (PST) Received: from localhost.localdomain ([69.163.84.166]) by smtp.gmail.com with ESMTPSA id mi18sm2820019pjb.13.2021.12.02.05.17.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Dec 2021 05:17:14 -0800 (PST) From: Tim Gardner To: kernel-team@lists.ubuntu.com Subject: [PATCH 3/8] nitro_enclaves: Update documentation for Arm64 support Date: Thu, 2 Dec 2021 06:17:00 -0700 Message-Id: <20211202131705.9536-4-tim.gardner@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211202131705.9536-1-tim.gardner@canonical.com> References: <20211202131705.9536-1-tim.gardner@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Andra Paraschiv BugLink: https://bugs.launchpad.net/bugs/1951873 Add references for hugepages and booting steps for Arm64. Include info about the current supported architectures for the NE kernel driver. Reviewed-by: George-Aurelian Popescu Acked-by: Stefano Garzarella Signed-off-by: Andra Paraschiv Link: https://lore.kernel.org/r/20210827154930.40608-3-andraprs@amazon.com Signed-off-by: Greg Kroah-Hartman (cherry picked from commit cfa3c18cd528f48fd1b4b584f330df8f00b8a97f) Signed-off-by: Tim Gardner --- 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 39b0c8fe2654..74c2f5919c88 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 Thu Dec 2 13:17:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Gardner X-Patchwork-Id: 1562706 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=KuQhvKDB; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4J4c241YG1z9s1l for ; Fri, 3 Dec 2021 00:17:32 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1mslxh-0008CP-NG; Thu, 02 Dec 2021 13:17:21 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1mslxe-00089b-8D for kernel-team@lists.ubuntu.com; Thu, 02 Dec 2021 13:17:18 +0000 Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id E7E043F1B1 for ; Thu, 2 Dec 2021 13:17:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638451037; bh=0Jl94UZvXcVlR/1XFp4/HD0+ns93auqlDw3iuexYO5E=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=KuQhvKDBW1Hm13fOwHijrYuWJAIIXfm/Csx5G7hySRFuLXmVEAoksJZFSpw4wf/Sy fM4h5VxGvGW4Lf0kFGMu1dep5oj18gunyvBQnFlgzXtXvhz5uVHEIJD2O3Y1jTj2wk LobZ5vvUJ/yW1HiD7uQprjY9jqjg5pVKKAIpXGIdR2CrN4QF/kQgWJkKQWpHvxk61s q5NM2t5ZLpE7EtFJWV0dW0wxFYqhcxgKWbn0fjfhdOvT5sf/6dWxZj8UW9aEfOjJwk +zUGQZC/k2Jc1USgkxFDdxPy6MsGE/ngTM91O3JPquHgpmd1cRihj693KNfdsJ8hlF S7fwGhSzSbUSQ== Received: by mail-pf1-f197.google.com with SMTP id y5-20020a62b505000000b004a804839861so13563410pfe.7 for ; Thu, 02 Dec 2021 05:17:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0Jl94UZvXcVlR/1XFp4/HD0+ns93auqlDw3iuexYO5E=; b=ZzkcEvYIldnuZiw+fihgtgXQ0JASb4W1bXWhFxCL4V37DNDms5w9YBBeiU+oNN75n1 DUnbjMbirdACfSiI9+cNmoEVo3PkyfAwvoZLb6tNiTYbO2YZKxFH2Pf+Uq1AggjHb/Pb zkHLFgLuRNZOhkXFF+dHAscSJ6ge04hee0bBkZPqLT60Nve9w5TF1gkGUkL7l6n0EW6f H/kpXzt+SJnFD5NyA6/ZSA+d//jurGEZgTeGNevKhbhsmyEs8VCVlmh5MCpuh9UozKmk 62ClZEXUpD2kcE7xg01GJASs3LBm7OBTGGNZYa4gj3wUqL9NKqEuC6iU/GjQUG5f2cRd 7rdw== X-Gm-Message-State: AOAM533B9CRXAmg5mEuzaGkdz+9GmPWTe5e/xnoLFcUgTioXUj8SDlhw 0FlLuitO/pxccE0mTalbx6jjPYQomfLvsyl+wKgArV+kXbSBBWLqJCP20MiwEwxbFeUEtByf8gY Z1eU2JtbciB9eI/84rg2vZGbRMAMPkD2mMiIEsbjrEA== X-Received: by 2002:a63:2155:: with SMTP id s21mr9624695pgm.20.1638451036346; Thu, 02 Dec 2021 05:17:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJzxzGOvQyYAiAzd7DugMUzgdJ3SmdE09Y/IKRbcBVrncy3gx3qOo3IYN01P2qbf9uD60S3Hxw== X-Received: by 2002:a63:2155:: with SMTP id s21mr9624682pgm.20.1638451036132; Thu, 02 Dec 2021 05:17:16 -0800 (PST) Received: from localhost.localdomain ([69.163.84.166]) by smtp.gmail.com with ESMTPSA id mi18sm2820019pjb.13.2021.12.02.05.17.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Dec 2021 05:17:15 -0800 (PST) From: Tim Gardner To: kernel-team@lists.ubuntu.com Subject: [PATCH 4/8] nitro_enclaves: Add fix for the kernel-doc report Date: Thu, 2 Dec 2021 06:17:01 -0700 Message-Id: <20211202131705.9536-5-tim.gardner@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211202131705.9536-1-tim.gardner@canonical.com> References: <20211202131705.9536-1-tim.gardner@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Andra Paraschiv BugLink: https://bugs.launchpad.net/bugs/1951873 Fix the reported issue from the kernel-doc script, to have a comment per identifier. Reviewed-by: George-Aurelian Popescu Signed-off-by: Andra Paraschiv Link: https://lore.kernel.org/r/20210827154930.40608-4-andraprs@amazon.com Signed-off-by: Greg Kroah-Hartman (cherry picked from commit e16a30a419c89d71e68f4da348b48918944fd49c) Signed-off-by: Tim Gardner --- 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 8bfbc6607818..6e9f28971a4e 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 Thu Dec 2 13:17:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Gardner X-Patchwork-Id: 1562707 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=Eo+AekpA; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4J4c2B0mp7z9s1l for ; Fri, 3 Dec 2021 00:17:38 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1mslxo-0008IN-BO; Thu, 02 Dec 2021 13:17:28 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1mslxf-0008AN-UY for kernel-team@lists.ubuntu.com; Thu, 02 Dec 2021 13:17:19 +0000 Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 1C39A3F1F2 for ; Thu, 2 Dec 2021 13:17:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638451039; bh=RGeUF0+9H6b5g0+URRGPMdmkAlz4Qv0G2HWCz3aHci8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Eo+AekpAOoxckcPeM8eFdTHvR+P5yRHlPI8X+w/d+3lu30cMXUxPiPvB6mp2C6f9f sfGYk3Q7sUl6Dlr1Jn2SxP+JqJLt6OymiAJhTJyc6v5/wlm8FQPP2013pD/dSkpg1R +dbTwEsjd2UmSUTX/3XKKLj3bitKUOYnEznaUGTmHTYCyby233YOveBtbf9TS6bqhd YgDH+AIBXf8oDSLZ68yo23Q2lswetweQ6W/nnjTMTWcszIP823PSv9xrG/JtuDQgs6 1H9jBmoTBXCYJUIvEr9hHvOzPqatAKuklE1wqNE5Wut4wBCs8rBZFACn4xO19NONu+ 37EZIZ64qMuRg== Received: by mail-pl1-f200.google.com with SMTP id m15-20020a170902bb8f00b0014382b67873so11637812pls.19 for ; Thu, 02 Dec 2021 05:17:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RGeUF0+9H6b5g0+URRGPMdmkAlz4Qv0G2HWCz3aHci8=; b=DQe35acXNZ4k6VgZnNQYJZMM1WL5bHhmOP8LK4dTzAMoqDWMnRmGirpAsUQ31HEAP5 ET7zJN1c3k1kjEtYGMGz5VMNmWHFMo8I/XUoy7nplcSq2J/0wQQQNIc29zF1x7rFPIao Vh0+OyV4JaeCDFRTkcxu0MrL6e4rvKc/5x5FGTXkketriCd/jfhuh2iZI+YBfRxchZCQ Lr3wqG+d+AapS569egQG3B5SFZzU1eUqrtvEq7dwAzWx8FjO/giAt7c5pIJ0Od3OE8P/ AokgQ/dgnG1maqGIDw3lDVujdy+ArZugur7PkX7DRJR1JGHZ2Z1rWDC4oJjkD5+zWrDh +gtg== X-Gm-Message-State: AOAM531OtXEvutO8E4x7e4J11sDliSjGZdHvBAuVwrkdV7DXEVQIb7kT v4qqOq1EI1EHn9nRfYqchRs23yK1cSBVXAKoM8fjPO9j3gf14dueop4Y7swkFZPymKQwCZSebPr 0kHS88fWgobeGrz2Mylkf8JBIZ94+CfGSB74gpt/H7g== X-Received: by 2002:a05:6a00:888:b0:4a8:56c:d2c with SMTP id q8-20020a056a00088800b004a8056c0d2cmr12621632pfj.40.1638451037527; Thu, 02 Dec 2021 05:17:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJwinXnM0leUGZEn8MtvD2yhGQWfqJZPGt+RYpZ66jvANIjdY2VGzt/DLMNVzBrhW0Q0h5aEIw== X-Received: by 2002:a05:6a00:888:b0:4a8:56c:d2c with SMTP id q8-20020a056a00088800b004a8056c0d2cmr12621614pfj.40.1638451037348; Thu, 02 Dec 2021 05:17:17 -0800 (PST) Received: from localhost.localdomain ([69.163.84.166]) by smtp.gmail.com with ESMTPSA id mi18sm2820019pjb.13.2021.12.02.05.17.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Dec 2021 05:17:16 -0800 (PST) From: Tim Gardner To: kernel-team@lists.ubuntu.com Subject: [PATCH 5/8] nitro_enclaves: Update copyright statement to include 2021 Date: Thu, 2 Dec 2021 06:17:02 -0700 Message-Id: <20211202131705.9536-6-tim.gardner@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211202131705.9536-1-tim.gardner@canonical.com> References: <20211202131705.9536-1-tim.gardner@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Andra Paraschiv BugLink: https://bugs.launchpad.net/bugs/1951873 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). Reviewed-by: George-Aurelian Popescu Signed-off-by: Andra Paraschiv Link: https://lore.kernel.org/r/20210827154930.40608-5-andraprs@amazon.com Signed-off-by: Greg Kroah-Hartman (cherry picked from commit e3cba4d2454c2e4034147ca53b75c6592ded7c5a) Signed-off-by: Tim Gardner --- 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 143207e9b969..40b49ec8e30b 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 Thu Dec 2 13:17:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Gardner X-Patchwork-Id: 1562708 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=Pc17s9qP; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4J4c2C1BNvz9s1l for ; Fri, 3 Dec 2021 00:17:39 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1mslxs-0008MX-43; Thu, 02 Dec 2021 13:17:32 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1mslxh-0008Bd-Fl for kernel-team@lists.ubuntu.com; Thu, 02 Dec 2021 13:17:21 +0000 Received: from mail-pg1-f200.google.com (mail-pg1-f200.google.com [209.85.215.200]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 4EEBF3F1B1 for ; Thu, 2 Dec 2021 13:17:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638451040; bh=0D6SOC1covvGGG9WDKcsofKKEmSI6m0AN3wluF7v+NQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Pc17s9qPqzXBgouDkKbKBNSh0bipZ9EbrJGze68xCthcWP5jBLW0bsoiC5DaaFJWA MsOFRbxXKjRHkUbzx0HyT1SuWjv2b3a6vs0ckv9HmdYF0Kc69rQSqgXc4uPKVAziQ9 E/YAw9hPrDOwLvOGcxAz0MpdXC2QreCjyQlWQuU+SU8sAt9xNMLwf3HgooZikHOHgw 82t6qWdYP+kygVHdmcj9Ko51IRyTkMc8XmBj9CtsgiwLAMmdU8Vvf0f3QiHzm7kL9U eoGsi57jmqHL92Ks3zwPkiQvD12lpsZGbhHLEFdPa5mQxG7GBZLUWYp6rwTAyTeY1H m80YrSvkKmJRw== Received: by mail-pg1-f200.google.com with SMTP id s18-20020a63ff52000000b00320f169c0aaso14087486pgk.18 for ; Thu, 02 Dec 2021 05:17:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0D6SOC1covvGGG9WDKcsofKKEmSI6m0AN3wluF7v+NQ=; b=pH1QQuXe7ARjSXcU/gpnz8x84aqPyYS5Eq+MSyxPWQ5P2lGxEDxZDrSihfXraQIs5O ULOmb1uRYFj7ZbVQ0aRLWMDcXApYcNUKgJAcGOU6rQ+8CuwhgS2f1fDGfnzBcUiVdNiM k8XC//qiWXPth1k9eRNIa/0b+a6bbKrXGtHT6ePluxDk5f0kYDG0Hy/WJdgxR3YMU8bE wELQen1mvedw2P+MyMkFopmNespTQBva+21zzI2X2WWRvR3caTpdczquUie3IpQdiY/m NnDf9cglw/t/nZAcGiraUiZsmBcWkMDwHFhvE7EOnleeSL9LKZhxLDLUIlaJgo/VSZyu iqiA== X-Gm-Message-State: AOAM532rxUHKoFxAKQ0EzaojQy56/bTV+7HXNZxoIBZZ3cTBX7cu1uIL qW606jZzxrIerRiSTd//smtI8ORDMCzepPIF3Pzq+pRKNb6VU07R5H8N0A96w95aPuU7STeyHRy ofH0Odc0JGNnTxrdvZxmVJBHx5d2xq1w5nJKEZTXbGg== X-Received: by 2002:a63:d354:: with SMTP id u20mr9563003pgi.366.1638451038717; Thu, 02 Dec 2021 05:17:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJx1koQTR/cxBEB7E3JoK2hRdENDcIcAWMITnOFT6X90wiF+Pf29YwrO5jRHOMBl1YAadgsBiw== X-Received: by 2002:a63:d354:: with SMTP id u20mr9562981pgi.366.1638451038492; Thu, 02 Dec 2021 05:17:18 -0800 (PST) Received: from localhost.localdomain ([69.163.84.166]) by smtp.gmail.com with ESMTPSA id mi18sm2820019pjb.13.2021.12.02.05.17.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Dec 2021 05:17:17 -0800 (PST) From: Tim Gardner To: kernel-team@lists.ubuntu.com Subject: [PATCH 6/8] nitro_enclaves: Add fixes for checkpatch match open parenthesis reports Date: Thu, 2 Dec 2021 06:17:03 -0700 Message-Id: <20211202131705.9536-7-tim.gardner@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211202131705.9536-1-tim.gardner@canonical.com> References: <20211202131705.9536-1-tim.gardner@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Andra Paraschiv BugLink: https://bugs.launchpad.net/bugs/1951873 Update the codebase formatting to fix the reports from the checkpatch script, to match the open parenthesis. Reviewed-by: George-Aurelian Popescu Signed-off-by: Andra Paraschiv Link: https://lore.kernel.org/r/20210827154930.40608-6-andraprs@amazon.com Signed-off-by: Greg Kroah-Hartman (cherry picked from commit 02bba596de19c0b951b2843ebcd7a9da6e0938d4) Signed-off-by: Tim Gardner --- 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 e21e1e86ad15..8939612ee0e0 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 Thu Dec 2 13:17:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Gardner X-Patchwork-Id: 1562710 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=edgAQrhg; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4J4c2F13Svz9sRN for ; Fri, 3 Dec 2021 00:17:40 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1mslxu-0008RR-OA; Thu, 02 Dec 2021 13:17:34 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1mslxj-0008Cm-DT for kernel-team@lists.ubuntu.com; Thu, 02 Dec 2021 13:17:23 +0000 Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 966983F1B1 for ; Thu, 2 Dec 2021 13:17:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638451041; bh=GROcg/h9vF5b2JjqXVKaglD40irCJs7NOGJ0ywSv3tE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=edgAQrhgt6/dvzIPjlN6uiTtZqbsxrdwdJxcCg7gtzgnsDqfMmCcI16/wGtiZv6bz mkQqSSsChmY4PlNr5lmb6l6SDAuLClnhU9Maub9Z7N+kOorWy24L7DVIiPM9R+Gu30 prTknbiBsSeKT2DZve2GyRqgWQu+PR62tLGCFQr8GqIGbAm48VTtu5nJM1SWV9YBt6 MF/tgB81GqZfOu5PzezIkba/fSntWh0t7dzZkGHmCbedR03ifkgUlx8YNfsMTvgnB0 RyUK115/6z9BS83dDxDpJEjFXYgBtvOvkQegbsma5mmNVZkDXRgkBjMXSOzaXI+MAP CLjpFL2nNCAqQ== Received: by mail-pf1-f198.google.com with SMTP id a23-20020a62bd17000000b004a3f6892612so17390441pff.22 for ; Thu, 02 Dec 2021 05:17:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GROcg/h9vF5b2JjqXVKaglD40irCJs7NOGJ0ywSv3tE=; b=CnQiNLETdOaItHkCBh5zsEO7JxEq9mKcTcU25diI4+TW1biRY+xZNwHlX30wsRNGgg W1SPZiGLqpeuF5nZBaumL6TpYR7+YJJgAzYVP3vIfJRQIQ4Zo2W6af8GYTRZaf/+saUq 33WyJUA1dFMYTW6FSszGLIv6gmFcHb5pBI2nNl0VKy3TYgSzRwrIa0ePIn9Xl7NVSHwY WZoGC7Z2s+7Kj+t2WdEZLO2N+IF81TBoDDiCIP6l49hoDA/DO3Ou6ovpLPPp78z5MHjZ 4w25fpenXJOhCEUdPkQNhAS+QUSijgN6stp9QyfX3bG1Veq/IGP7xg7caAwyRdaSA7f9 qIjw== X-Gm-Message-State: AOAM531ZFFx7Ij1agDOYdQg9qojaEvnU/I9r3zAOEYehP0CJABWf/7PK mnCKrNptbBJ8PPforeOxUh6y8yrp+6ZB6P4RhAR90xMYCBIpR8oVfiz9AlcoPJfIaFwVC3kMv6J xDBvDliQ9//tlJFpLfQDQCWdbiLE/7MoMInX3B/LZMQ== X-Received: by 2002:a05:6a00:188e:b0:4a4:f2fd:d7b9 with SMTP id x14-20020a056a00188e00b004a4f2fdd7b9mr12429834pfh.20.1638451039878; Thu, 02 Dec 2021 05:17:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJwCRi6DaUvmb17y02wRiBlIqNwLInFC/9VFBnlAMgczOWSw/EOnYfFeUpY2lxgFf7y38JpiRw== X-Received: by 2002:a05:6a00:188e:b0:4a4:f2fd:d7b9 with SMTP id x14-20020a056a00188e00b004a4f2fdd7b9mr12429810pfh.20.1638451039610; Thu, 02 Dec 2021 05:17:19 -0800 (PST) Received: from localhost.localdomain ([69.163.84.166]) by smtp.gmail.com with ESMTPSA id mi18sm2820019pjb.13.2021.12.02.05.17.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Dec 2021 05:17:18 -0800 (PST) From: Tim Gardner To: kernel-team@lists.ubuntu.com Subject: [PATCH 7/8] nitro_enclaves: Add fixes for checkpatch spell check reports Date: Thu, 2 Dec 2021 06:17:04 -0700 Message-Id: <20211202131705.9536-8-tim.gardner@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211202131705.9536-1-tim.gardner@canonical.com> References: <20211202131705.9536-1-tim.gardner@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Andra Paraschiv BugLink: https://bugs.launchpad.net/bugs/1951873 Fix the typos in the words spelling as per the checkpatch script reports. Reviewed-by: George-Aurelian Popescu Signed-off-by: Andra Paraschiv Link: https://lore.kernel.org/r/20210827154930.40608-7-andraprs@amazon.com Signed-off-by: Greg Kroah-Hartman (cherry picked from commit 059ebe4fe332c5d1c25124166527cdf9fe43a3ce) Signed-off-by: Tim Gardner --- 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 b945073fe544..e808f5ba124d 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 480b763142b3..6a60990b2e20 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 Thu Dec 2 13:17:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Gardner X-Patchwork-Id: 1562709 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=shmAklj8; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4J4c2D3jzWz9s1l for ; Fri, 3 Dec 2021 00:17:40 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1mslxt-0008OU-4w; Thu, 02 Dec 2021 13:17:33 +0000 Received: from smtp-relay-internal-1.internal ([10.131.114.114] helo=smtp-relay-internal-1.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1mslxk-0008Df-BC for kernel-team@lists.ubuntu.com; Thu, 02 Dec 2021 13:17:24 +0000 Received: from mail-pg1-f198.google.com (mail-pg1-f198.google.com [209.85.215.198]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id B0ED23F1B0 for ; Thu, 2 Dec 2021 13:17:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638451042; bh=VRwT8gojvqDbxUZr1DO1Jg9ooXCYZM6sRtWeV9yZIOY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=shmAklj8lYaEdKBYbybDwXGw2nKeRsLet5DN02RTB1pR5Gr8LXioEhxkKjvTiNg8d 8ZdnbvUyecxCkrGzJubRp7XLI0qv2BTizrDm6XOHN1UavBt8146uCevwhsuk1tKRMu 8TM1rnnP+LoGflNrLBhUelxFvVqaK6jwoOHDX1R7hWz8sKAn1fV6kjnSLpjTrDt+2i L4kqWd9Ez/Mc5beWaH9Q+a7e1ziCaUhWmEcz/9cdTwnHJmGO0mkxXGHMt8vRTbhEfk 7K7h/cKtvtyQLefM7wgGwx9R8OHomcAjP8xAvvVFk2r+SxqUqzENIDGvxVxFqsjLmd A+JaH2JJPe7lg== Received: by mail-pg1-f198.google.com with SMTP id d2-20020a656202000000b00325603f7d0bso8645027pgv.12 for ; Thu, 02 Dec 2021 05:17:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=VRwT8gojvqDbxUZr1DO1Jg9ooXCYZM6sRtWeV9yZIOY=; b=cCGckf7pZ2m4CC8ZdFNhPaQ/9in9gC8u8be+fvp64aK/aZEHORyhy628/8dlCN0pRF Ibc66dEgMIzSHKc/jLc+KaTEbcM5HTQjHwpQaUSgslumRxrIXtNM9VrqAoS5DxbYtBdd kyE9+8t1mwlnVYdr/paWiiqAkI1sAZyqve6hEyujKR1fCciCz5ypqGS3qR9QD1jaushL ST+if5smmrJ1uHPKdKsYi+ZTy0Dav3kBpfuAWbg1P/ru6FcdDEAOV9imKgT3Q5tBY6c9 CVk5LKPxQdR1/32fqK16VZOWg88gsVO59FquYl9N2JLoVJxq7NFhS+59oDHiRaNu9Gcq KH+g== X-Gm-Message-State: AOAM530oLRid5EJ/0DWx3GM7k7Vfj/mgrQxqSdiwceFH6cRBOdsDmcbU P+yXAce/anYHWW9BTlgGy3U73GqbfqDnFeweWMLJfNHTcKVt+WqIkAr16cfHDBKZuh7u31qDw7Q oQrnaQxtKjcT1t0N6oxwD1t8T1Ffe0sWGLWhVM0Km4w== X-Received: by 2002:a17:902:9882:b0:143:91ca:ca6e with SMTP id s2-20020a170902988200b0014391caca6emr15354474plp.64.1638451041096; Thu, 02 Dec 2021 05:17:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJz8dZVwYpyyXQ0Vozg7EtbKf7paP50GyTVtyJsDZlYSda1qfr4D/SEDxN29TnicA61yz+SZlg== X-Received: by 2002:a17:902:9882:b0:143:91ca:ca6e with SMTP id s2-20020a170902988200b0014391caca6emr15354447plp.64.1638451040797; Thu, 02 Dec 2021 05:17:20 -0800 (PST) Received: from localhost.localdomain ([69.163.84.166]) by smtp.gmail.com with ESMTPSA id mi18sm2820019pjb.13.2021.12.02.05.17.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Dec 2021 05:17:20 -0800 (PST) From: Tim Gardner To: kernel-team@lists.ubuntu.com Subject: [PATCH 8/8] nitro_enclaves: Add fixes for checkpatch blank line reports Date: Thu, 2 Dec 2021 06:17:05 -0700 Message-Id: <20211202131705.9536-9-tim.gardner@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211202131705.9536-1-tim.gardner@canonical.com> References: <20211202131705.9536-1-tim.gardner@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Andra Paraschiv BugLink: https://bugs.launchpad.net/bugs/1951873 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. Reviewed-by: George-Aurelian Popescu Signed-off-by: Andra Paraschiv Link: https://lore.kernel.org/r/20210827154930.40608-8-andraprs@amazon.com Signed-off-by: Greg Kroah-Hartman (cherry picked from commit da1c396a81b87541cf7a7c2c6e128b722461a1c8) Signed-off-by: Tim Gardner --- 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 6a60990b2e20..765b131c7319 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; }