From patchwork Thu Dec 2 13:46:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Gardner X-Patchwork-Id: 1562724 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=NHIEcN6p; 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 4J4cgl3kB0z9sRR for ; Fri, 3 Dec 2021 00:46:43 +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 1msmPy-0006AQ-9d; Thu, 02 Dec 2021 13:46: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 1msmPv-00068X-Mf for kernel-team@lists.ubuntu.com; Thu, 02 Dec 2021 13:46:31 +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 5F2F43F1F2 for ; Thu, 2 Dec 2021 13:46:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638452791; bh=Ya0vC/NEFwDpQq7EnXyqyqdctJpj2Dh1lvh2E0pBXs8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=NHIEcN6pQ1tv2GPW6TW1PNRSdVZMNcOtaDTSn2lREE5QiMzcjeVkI96tFKalUHWhQ WZ67/8b/PAnrorOFU2KLgOha5/uCp9TGuo29VooJsfGhQlc20HMia92mhRt5dVqAsF f/GeSROP+63jFKcGnomAhHqt1ogyUDDIFd8VgapS5DsHtF//VaG/eZdqDiefSklkGY n8hvbSHRYbjdu/J8F6xy8uKldN5puol1adyW+nCCrudkafBqJxQe30SFU/n6OOpS/Y IKA6Cih3/yUOYVgVEH22T3tHydCFTExNnfIZZi0G3939gf9oFzDJ7jW09yUE+FzuUt KvXBF6nUpMKGA== Received: by mail-pj1-f72.google.com with SMTP id b8-20020a17090a10c800b001a61dff6c9dso10635593pje.5 for ; Thu, 02 Dec 2021 05:46:31 -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=Ya0vC/NEFwDpQq7EnXyqyqdctJpj2Dh1lvh2E0pBXs8=; b=ymECpafdVed/fYh6BG2v8gpnE9L23jw30AhMXPG78DCAj8U78J+cmr0fzY1uZtwh91 Y2yVmBsdPpqdZ/XP3pVQy3UledEwQu7nodj3lqOR+7+9HmXNYS4eSZkHxqpZjKCZsuJl npwP3upzgwyr5iQlBsstUV/WH/oD0Mrbb+kTX3hDLSi//FetM1vW7jNDposbgXH8tQ7W zC7Zh14eNofMC6Rx3D6bEltK88/ZSshnoyvNTIWxjr7K/un2OEzd40o1UL+U5ej7FqNw C40Tq+/dlhU1cqhZ58ri55C/Ka6VZMuTsIQKzi/7U90N/wo26lgAXPr4H7boQ0y3i6Fc T8sQ== X-Gm-Message-State: AOAM530zZWqAUCPN9FmuIEJUCaDdMGEyEfbvgGu6Lt63/MrYguzmAo2j EwDBrbKILw10nGoLfvm+RGO0t5ThYQSuZGipB+2HSH3K7U/pq+nzvfuxE/3XYqFbxXsX3Xk3lj2 gaL+2rC8Ak5Ka29H5C+nrZc0LpmIGHy4KaVKUpvLunw== X-Received: by 2002:a63:495b:: with SMTP id y27mr9750107pgk.601.1638452789639; Thu, 02 Dec 2021 05:46:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJyW+V9DjKTNF5eetCuxaQDmWEh0ZE05uZgTZFUDSx5/ywobPLHxyP1uu2D808RXaHYUwsQLDg== X-Received: by 2002:a63:495b:: with SMTP id y27mr9750080pgk.601.1638452789358; Thu, 02 Dec 2021 05:46:29 -0800 (PST) Received: from localhost.localdomain ([69.163.84.166]) by smtp.gmail.com with ESMTPSA id a11sm3517258pfh.108.2021.12.02.05.46.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Dec 2021 05:46:28 -0800 (PST) From: Tim Gardner To: kernel-team@lists.ubuntu.com Subject: [PATCH 1/9] UBUNTU: [Config] aws: Update arm64 annotation for CONFIG_NITRO_ENCLAVES Date: Thu, 2 Dec 2021 06:46:14 -0700 Message-Id: <20211202134622.14875-2-tim.gardner@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211202134622.14875-1-tim.gardner@canonical.com> References: <20211202134622.14875-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" BugLink: https://bugs.launchpad.net/bugs/1951873 Signed-off-by: Tim Gardner Acked-by: Krzysztof Kozlowski --- debian.aws/config/amd64/config.common.amd64 | 2 +- debian.aws/config/annotations | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian.aws/config/amd64/config.common.amd64 b/debian.aws/config/amd64/config.common.amd64 index 486e412aa94a..8da00dc238e2 100644 --- a/debian.aws/config/amd64/config.common.amd64 +++ b/debian.aws/config/amd64/config.common.amd64 @@ -12,7 +12,7 @@ CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=8 CONFIG_ATA_GENERIC=y CONFIG_ATA_PIIX=y # CONFIG_BCM_VK_TTY is not set -CONFIG_CC_VERSION_TEXT="gcc (Ubuntu 11.2.0-7ubuntu1) 11.2.0" +CONFIG_CC_VERSION_TEXT="gcc (Ubuntu 11.2.0-7ubuntu2) 11.2.0" # CONFIG_CMA is not set CONFIG_CRC8=m CONFIG_CRYPTO_LIB_POLY1305_RSIZE=11 diff --git a/debian.aws/config/annotations b/debian.aws/config/annotations index 09320b56b6e1..b2d3ee984663 100644 --- a/debian.aws/config/annotations +++ b/debian.aws/config/annotations @@ -4,6 +4,7 @@ include ../../debian.master/config/annotations +CONFIG_NITRO_ENCLAVES policy<{'amd64': 'm', 'arm64': 'm'}> CONFIG_ACCESSIBILITY policy<{'amd64': 'n', 'arm64': 'n'}> CONFIG_SPEAKUP policy<{'amd64': '-', 'arm64': '-'}> CONFIG_DRM_AMD_DC_SI policy<{'amd64': 'n', 'arm64': 'n'}> From patchwork Thu Dec 2 13:46:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tim Gardner X-Patchwork-Id: 1562725 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=aiy+83jW; 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 4J4cgl3crlz9sRN for ; Fri, 3 Dec 2021 00:46:43 +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 1msmPz-0006B5-7E; Thu, 02 Dec 2021 13:46:35 +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 1msmPw-00069H-Ig for kernel-team@lists.ubuntu.com; Thu, 02 Dec 2021 13:46:32 +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-1.canonical.com (Postfix) with ESMTPS id 613083F1AE for ; Thu, 2 Dec 2021 13:46:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638452792; bh=dAs19Oppp63KDaeR9B1NiePkxjx5xPvH2cf7paOklQY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=aiy+83jW9nWTZccToP6SbBuc2lbuQiflJOfGt2zi51GfedXLZ6m5TqzSquyK8GVzd HLue1oOAKcjva9LJ/BI/jN1vfBYYev/OztxsgzDNuzJtDgmbFrWiqJL5J0dNTB725E jaH9fqNxvNniXxx7wxmImQAlMpNRifBd4nFnrr9wnHNGrD5q+y4AqRKkjQn5VBUdPL Dbug+F4ncF2X/PzJXe7FZOovuJgv1VcZwgQBVKXaSmBvoPbIbZ0MoGIY7LPiqm5C7P oSGP6sonPpZ8zYtKZ4C2zIuNE4sAArxPJUVXba4qcH/cRJSqVCgA1JqBk52rwwE7L9 3x+nAGGm4SeHg== Received: by mail-pj1-f72.google.com with SMTP id x3-20020a17090a1f8300b001a285b9f2cbso10626660pja.6 for ; Thu, 02 Dec 2021 05:46:32 -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=LHGqUJ6V5iXNcm08/1PducaJ2glgqP8rycI9rNTIKJTXUCoZ+szY5qz5rmjyXJplJW DXtdDeZ2Ys/WzbJLJd2owcnPTDN7J645YHwJCPJgOaAsx3IKLKM7AOu/87Vw25E65TyK Ui3vpEWI6kb5F1y8kAOG5a/itwD7vABldjTjkccK+qdTJAMN7vIopaK9zf8wgkfff6gn DTB1CDVkyDJabOnygnHva5K2gHvD8z3CVBT5+lzbbTj3WCLfiXYuOfNRU4Is5PU+Zchi rD8HlggKVgWD8zwwhAvs9fm6lNUiQ2NvPdq/eoWFAk0vklx+ORbEiEPCWqmW53oRF1uj sxZA== X-Gm-Message-State: AOAM5337dB8hrpd/7uZxqetH8bCqb757E01CuF3AI5/2MS2HNxOQ2jC/ wRF0V7WLMEQefEFccz+/BnhyEVxd6E/Yizh7SRqSCAJQ/5jEzl9gMrBEfDkgMj85s7QZVYriuM8 IHp0FE3dYuePnU4G0lNxbBRlfRUmB9BdVdTXQfdkdeA== X-Received: by 2002:a17:90b:3e8c:: with SMTP id rj12mr6110877pjb.152.1638452790801; Thu, 02 Dec 2021 05:46:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJzcisjmJvDs5cA8dp996EVe9/mOtw3wPdLQqAZOAtk6+I2OI9r4hV9e0xB/CObYm5IX8WQPFQ== X-Received: by 2002:a17:90b:3e8c:: with SMTP id rj12mr6110849pjb.152.1638452790580; Thu, 02 Dec 2021 05:46:30 -0800 (PST) Received: from localhost.localdomain ([69.163.84.166]) by smtp.gmail.com with ESMTPSA id a11sm3517258pfh.108.2021.12.02.05.46.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Dec 2021 05:46:29 -0800 (PST) From: Tim Gardner To: kernel-team@lists.ubuntu.com Subject: [PATCH 2/9] nitro_enclaves: Set Bus Master for the NE PCI device Date: Thu, 2 Dec 2021 06:46:15 -0700 Message-Id: <20211202134622.14875-3-tim.gardner@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211202134622.14875-1-tim.gardner@canonical.com> References: <20211202134622.14875-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:46:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Gardner X-Patchwork-Id: 1562726 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=qCWHYWKm; 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 4J4cgt0861z9s1l for ; Fri, 3 Dec 2021 00:46:50 +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 1msmQ2-0006De-MF; Thu, 02 Dec 2021 13:46:38 +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 1msmPy-0006AL-DW for kernel-team@lists.ubuntu.com; Thu, 02 Dec 2021 13:46:34 +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 C2CBA3F1B1 for ; Thu, 2 Dec 2021 13:46:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638452793; bh=Q3+HxD472D2nmmx+zsnUJnq5DaYonj6QF6L04KG3GHY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=qCWHYWKmi0R670LB4WyiZO5slheFL1HEKsM5XC2HRD4wa3jSW6uEwvNlVUs9riTsD 5ezmnEDKOmVdxOj5FZ0eB4hk6nz8HU/HNNiur0hAP6I0yotxTwXfVI4IYxLEWg5OY8 8jUm+1F1su7bqZBDWPW6kiWLnQ4NHo8s6LYR+iyOHf3z+kxoSFHymizlq3TkgsRyBP ydkv6tdUyb9UVcmw7EguvOihO/GI4RL88sTg+WVoOauwJ3L4/UUV2XJahcO8cS8GWF ItOSlHznsoVX2YUnO8nzvprSq20JCm8/v+i/Yu3v4qF42d6SZxgwVG+oJJOHZcuBIo O2z816HCbjFUQ== Received: by mail-pg1-f199.google.com with SMTP id v3-20020a63b643000000b003255b6cb43aso8831256pgt.6 for ; Thu, 02 Dec 2021 05:46:33 -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=RFs0gkYBE/E0iVyvvsidK3V/bHUFGFiDY033Z1ZY2Sooudglu1Dxg6soGKf+M/Zirp cBUrZILSw3EwE8FONXzM729PbsU5GuCHv1mwjWsyigAn0FRUt7BRnAw7M9iit07vdrUk avCKH7+VzEYOrmnlMk8XwNbNwr9Jb+8zbjX9RNkIe0hS/G+tLL+bdEm4YqVqonKIkju3 q2vqCP7MbVV8ODRP2ERYPsKNL6EHtuOoWXd/fGmUMGLKMEMGfqWNgLQvYfaBeL9uHysL ZZXlILGH4df4PsUHUpNNlg6wRjJKJ2Ud9KB929UknXd1q8u7DPY3YrFJAtajWlKLoxiE PkWw== X-Gm-Message-State: AOAM532oaTypvO4u+a1Y/IozHNF0q6HQEuypaauMs+coEWyc9lfTMxfG ZlmhBjJ+6YTnZ/FLQB/miDKNI/cBHClvwE9vVDTb1OuJBtUnwY+59mzXreEZTEWHUsMw6RZoCHO 9EEZ43XVebGeMxVQOC3rnplovHcgcG9LvG6FWeAJG3g== X-Received: by 2002:a17:90b:38c5:: with SMTP id nn5mr6022677pjb.220.1638452791884; Thu, 02 Dec 2021 05:46:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJzWsNB/bDBWA41I84be+eEa5AD6Qzuk0UNV1YXqMOHa6FOoR7W9XRHKfpE3FbrpHNV8s/GtKg== X-Received: by 2002:a17:90b:38c5:: with SMTP id nn5mr6022648pjb.220.1638452791602; Thu, 02 Dec 2021 05:46:31 -0800 (PST) Received: from localhost.localdomain ([69.163.84.166]) by smtp.gmail.com with ESMTPSA id a11sm3517258pfh.108.2021.12.02.05.46.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Dec 2021 05:46:30 -0800 (PST) From: Tim Gardner To: kernel-team@lists.ubuntu.com Subject: [PATCH 3/9] nitro_enclaves: Enable Arm64 support Date: Thu, 2 Dec 2021 06:46:16 -0700 Message-Id: <20211202134622.14875-4-tim.gardner@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211202134622.14875-1-tim.gardner@canonical.com> References: <20211202134622.14875-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:46:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Gardner X-Patchwork-Id: 1562727 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=tXZ7jAm6; 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 4J4ch00F0qz9s1l for ; Fri, 3 Dec 2021 00:46:56 +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 1msmQ8-0006Ij-4Q; Thu, 02 Dec 2021 13:46:44 +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 1msmPz-0006B7-OM for kernel-team@lists.ubuntu.com; Thu, 02 Dec 2021 13:46:35 +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-1.canonical.com (Postfix) with ESMTPS id F39533F1BA for ; Thu, 2 Dec 2021 13:46:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638452795; bh=5TG5mAHFUkZm+5l/uVLtvJGZbjuCZEh99Q7y9+CRV1w=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=tXZ7jAm6dVSGemgBC24/I7HcQCJaJVew43m5MbbSfivpfTeIHPzombgYuC2ireEoo TfyExwTr2IncJabjpYRjBxHD0EtxBhDDQQaGa9TRbLBZpWf/IjNyRKWPQV+8LFlK5p YRwQzb5o69mwFLSbC2GVAVPuYunLn/k32ktvn7Gp+Ch3vJPS7g10OFCaiy2OcCbUWG LlhqQmBsYarY9+j6op3866y5UWdrlDMrto7vRcZJlPsHy2PYsSnxtbGghKt02y3GUU uhj3mZ7KTpQK5+lTPIyT/hfL/Z/8KpXFC++eiSjhv0G41ZDIbhjEy5Wdurt/iRaORL iDLSNpij2R9vQ== Received: by mail-pg1-f199.google.com with SMTP id s8-20020a63af48000000b002e6c10ac245so14125282pgo.21 for ; Thu, 02 Dec 2021 05:46:34 -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=d7jRUEd0Y45Sw8uwobvA51O/9bp5ppqXoRirmIDjXdYwec2s9yRopf6srCk+U2UBOf oANn0TcLG3YBGb/npTvCccuGxt1uMURmctmRUHaP90xFBPHbhnrydNNbUywMTqbYDUTb mwWV51Ur3mT1hM6XSz6kgZgKEWzfgh0m1zznQjgSz6WiKkn0XUls3fdViBrIfd2CgZjW 0zjkYre+BATI/WolRUTVNukTzQtB/23CC5mYtatnQ/UgpfI89O1g4GCzYcZIvC52fK2g wsBotmiARj0YqM4xwVwVNMdTuYPO5Butc27tjdX6gRro3ISIAKWwTamATC0GWzDCqiwo XILg== X-Gm-Message-State: AOAM532zOQF+vVVKaU7EoTPvTzrsvfCkYmrNGmBi+JBklxbj25DrTzoN 0rtI9rsNdcG98Xy3D9YIVmXZBZG6rueSsuNOEEkd/RB+xy/nB5oPFkbkcisOuXopQKS0szsujg4 EwjBYgtyB8GZS3/uuRPep7e8C8f+Hgpos4J8vgrx1Ug== X-Received: by 2002:a17:90b:3508:: with SMTP id ls8mr6105467pjb.51.1638452793146; Thu, 02 Dec 2021 05:46:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJxtvUIus6/ptjqEaZQx3XHXJ6jVy3evCV06yIc7zf6amroz9FsMPhajgkvBryR7hk7b/Q2XGg== X-Received: by 2002:a17:90b:3508:: with SMTP id ls8mr6105433pjb.51.1638452792760; Thu, 02 Dec 2021 05:46:32 -0800 (PST) Received: from localhost.localdomain ([69.163.84.166]) by smtp.gmail.com with ESMTPSA id a11sm3517258pfh.108.2021.12.02.05.46.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Dec 2021 05:46:32 -0800 (PST) From: Tim Gardner To: kernel-team@lists.ubuntu.com Subject: [PATCH 4/9] nitro_enclaves: Update documentation for Arm64 support Date: Thu, 2 Dec 2021 06:46:17 -0700 Message-Id: <20211202134622.14875-5-tim.gardner@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211202134622.14875-1-tim.gardner@canonical.com> References: <20211202134622.14875-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:46:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Gardner X-Patchwork-Id: 1562728 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=TJ3OLB/P; 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 4J4ch55K86z9s1l for ; Fri, 3 Dec 2021 00:47:01 +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 1msmQD-0006Mg-7X; Thu, 02 Dec 2021 13:46:49 +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 1msmQ0-0006BZ-Lp for kernel-team@lists.ubuntu.com; Thu, 02 Dec 2021 13:46:36 +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 A76EE3F1B1 for ; Thu, 2 Dec 2021 13:46:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638452795; bh=0Jl94UZvXcVlR/1XFp4/HD0+ns93auqlDw3iuexYO5E=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=TJ3OLB/PDpVIzgzrF/burTIjTK+O7DrGjgA/Vafu1hmfv+Ex46t9Bbw3sU0fQy89S yD+Vf4is5vug5OIkWdBprbDKJUkZEfb63pGZA4rHezunwbs3iPzPfA06M4j6GrdnLx HoZYsxLKlaU46IyAlI1WX+3Qqfok3Tsj9wUo73o2hc7Nj8Ab7VmhpfIYZWpF3BM5L7 PEZ2nBJZo9W9FN5uY/JYWf4Ma9YJh8siROxIQWyzONPQ9ulqktsFdSpkRvz/KXRz1e aID8MQARYrOwSIzgb2yBPX9UDtRQreHazXTsFu4VXP+NPGidbI85XoiUPviMfbWoCU mYnDUuN1OfDGQ== Received: by mail-pg1-f199.google.com with SMTP id s18-20020a63ff52000000b00320f169c0aaso14129703pgk.18 for ; Thu, 02 Dec 2021 05:46:35 -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=N2A1nlakhqhqzDEAuz4syUOSGZ0eA18JJwJRnp1nZZ++gbqmQqXRMfJhzXDuymAFWc iZbB02XNAKz2W6sFjk38fyXO/e3+Y7eNkxLNZn4VM990KSWuc4YBFZnEr+UAdfRpLpps 72PbIEy9AlH8Q7b1J4RpQJ97FDjbfassQR/qMcmcoYnLMPt+tTfD46Ym2fBN3y9S3cID T3pA4UimuAcQxYBS1jmptI9UIrjlBnQ+3qIKIC/KZNpP6w+zs3pSSU/NvnaObNQANoze NuNeUCxRG0v297yKSOOuRtOwahojVmuUUKae87dBzGqp3aWofkDAL3Fen/YBjrZTXDbi OokA== X-Gm-Message-State: AOAM532o0wYW1j1RNQQAgE+WXVEefKHRyUCnI9u0vB/YzB6wegQqu2e3 t9pJGpTfM4At7/GaaFBikGo7BX+NLgq3gcUSNCBjObWYaXiJMEDbA72nz/KdCriZPimaaTLRCTM lc3fYod1aZe7Wiokl6WOA8gkp7d6oVGIOUHFPjuGPrg== X-Received: by 2002:a17:90b:4a01:: with SMTP id kk1mr6117596pjb.7.1638452794106; Thu, 02 Dec 2021 05:46:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJxbYAAIKuYl30wRNObxxs5BXWy8MQnD5lXHmiUWbCKtwyEv1J5cUFPY8L4kUx4H0O2U3+XrCQ== X-Received: by 2002:a17:90b:4a01:: with SMTP id kk1mr6117557pjb.7.1638452793733; Thu, 02 Dec 2021 05:46:33 -0800 (PST) Received: from localhost.localdomain ([69.163.84.166]) by smtp.gmail.com with ESMTPSA id a11sm3517258pfh.108.2021.12.02.05.46.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Dec 2021 05:46:33 -0800 (PST) From: Tim Gardner To: kernel-team@lists.ubuntu.com Subject: [PATCH 5/9] nitro_enclaves: Add fix for the kernel-doc report Date: Thu, 2 Dec 2021 06:46:18 -0700 Message-Id: <20211202134622.14875-6-tim.gardner@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211202134622.14875-1-tim.gardner@canonical.com> References: <20211202134622.14875-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:46:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Gardner X-Patchwork-Id: 1562729 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=RG9K1by5; 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 4J4ch83Pqwz9s1l for ; Fri, 3 Dec 2021 00:47:04 +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 1msmQH-0006R0-NZ; Thu, 02 Dec 2021 13:46:53 +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 1msmQ2-0006Cv-LU for kernel-team@lists.ubuntu.com; Thu, 02 Dec 2021 13:46:38 +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 D4D0D3F1B1 for ; Thu, 2 Dec 2021 13:46:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638452796; bh=RGeUF0+9H6b5g0+URRGPMdmkAlz4Qv0G2HWCz3aHci8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=RG9K1by5ww97YYHF/HIiU2NaNDjOv/UsSgKZuadeRaW/DsbcacFyLbU0PVLsOqzPS 1p2jCvduW1/hqFq7xvCNHq13eanCskQYMoiEiMeXQlL4lC3328ou5pEDfgqvw5quXX djOh1FEr5L6HQ5IvyldxCcqOULjv3iIniRtM8ME9zL0R52maEr75wH+RlFZISOIJAi kdUn5QvXYaxOhU/JLEBOemYnJz4VesSBYz6sYm5Cjh/Mz1hVSkwmEBT+TnicXPjUsc 1+kwjx7MetvTwT8dftEZq3+oJjOXrXXYK6nxjCpUVHGadN3Xu+B8cEUDzfstC5YPNW /LMVpJD3uOoSA== Received: by mail-pg1-f199.google.com with SMTP id t8-20020a63f348000000b0032e1e775705so2454322pgj.8 for ; Thu, 02 Dec 2021 05:46:36 -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=2Ee8f28hxkkmu0c/KR2ay3WEUqH/A5T7j8iA+O5+UmLkcQ1kUsq6KRMTC55ZnDy6fl VGvULilsuD9S1ibTTnycxOS5fY4zwKrYFo3xc0DWfT1zfnlQqp6O8kNEZqqo4a2fn/wz oY3/OMb44+lJEk1bNweZSHeOQ+huFf0Hzv2yG9OkpHQ1FcyvEzxGkcAEpc/iB2EUZYQy whUiLr1ri+lJ6/rkJAEhPCQkU3xlr4NDvr7JzE8N/2Ov3qGJhaNKxBblHeahJZJ5n+FS WvbYI0rrWy5a/MrwjGgufpGDdceDc/deM0OC/BxBUcGaoPKRA7Zpb7EuaXG3hz8CA8KB vddg== X-Gm-Message-State: AOAM531h670FMjEO16vvyc+8tC/cDiNC2B9peZBVK0OUyqFHjrU2cyT1 GARsjlZLvfRe4yFdnm4GFKOLu1iBmIXX+urA4RkGji9MH3sh4/nAPtZ3qeUmH+8EzYEd8RE/5YQ qq8jCILRk42Hxp8wYEw84qAY2/EnmdVIUTdpYxjvedA== X-Received: by 2002:a17:90b:1e49:: with SMTP id pi9mr6106455pjb.220.1638452795187; Thu, 02 Dec 2021 05:46:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJw/5tWzQD0B4HeekQxXTtgkbQAN+DizBQNCk+jax+nQSvRhpGr8fDxxZ02FhjqHit+3Ot8Qkw== X-Received: by 2002:a17:90b:1e49:: with SMTP id pi9mr6106417pjb.220.1638452794931; Thu, 02 Dec 2021 05:46:34 -0800 (PST) Received: from localhost.localdomain ([69.163.84.166]) by smtp.gmail.com with ESMTPSA id a11sm3517258pfh.108.2021.12.02.05.46.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Dec 2021 05:46:34 -0800 (PST) From: Tim Gardner To: kernel-team@lists.ubuntu.com Subject: [PATCH 6/9] nitro_enclaves: Update copyright statement to include 2021 Date: Thu, 2 Dec 2021 06:46:19 -0700 Message-Id: <20211202134622.14875-7-tim.gardner@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211202134622.14875-1-tim.gardner@canonical.com> References: <20211202134622.14875-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:46:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Gardner X-Patchwork-Id: 1562730 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=Hfe7KGjB; 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 4J4chF2lNBz9s1l for ; Fri, 3 Dec 2021 00:47:09 +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 1msmQL-0006Uu-4f; Thu, 02 Dec 2021 13:46:57 +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 1msmQ3-0006Dj-7v for kernel-team@lists.ubuntu.com; Thu, 02 Dec 2021 13:46:39 +0000 Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) (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 14E743F1F4 for ; Thu, 2 Dec 2021 13:46:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638452798; bh=0D6SOC1covvGGG9WDKcsofKKEmSI6m0AN3wluF7v+NQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Hfe7KGjBZNy7t7DAca0BaVn+XbKCYKzYhnups+XLpCGku9z0Y4/QuioIjNrDkj5qM 40yyNpnz5/+zuvgwi5Hw6LjhvW/l37lkGvw3Adqe1f8lU9jEQBdvEgcfQ4zriGd+C/ t5J8t4oEiGQ8qyeyhbkaUl7F8bEBUuxs0E6OsZQlEMg15BvzmO6w7y2IIGS1b5sosL bZ3ofLivZaygR7pbj9EwNcDhtbNw3I4G63xcOVBARp5AFpuOpZyoTxKZhdbQwPyLmk ooHKe8ntN6Vnj7knV7Aw3Sr56bcYLNPeu5u7jivW6VCdSanWt9Q/eb5xC+iY0fteO1 LXxEChp0GSG9w== Received: by mail-pj1-f71.google.com with SMTP id h15-20020a17090a648f00b001a96c2c97abso10631615pjj.9 for ; Thu, 02 Dec 2021 05:46:38 -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=0LVBPG64tV4ZK8GhLAGriLKWpaj4lE4WIbJ2m59s3DagQPhmK/O6eGZk9v8jEWlJNo qZDSZbAFzt7XOWGvv5o8JUHRkilBs5GJgNWmN3ycmsKy5ZU3GANlKW4btN8trouufN6t LdSpCo8X6P7qjJ1EJmKT9Wj7TPtNjSTI23X5u8hjf12uamS5u5LqjK/cJW5Y12MxlfeE Ok4/SzKxocqZfLfDqYsPnX7vXclumv7yvyiWwKHjNdjBExq3EFkid484N8gNhTVe7Kmq 7ow0eqUgctJp/BAFtXrIrYDqt9kEnujN+kSrxoaf3sfOAgDZ8p43DqDmJRi9YKRUwfaK YxQA== X-Gm-Message-State: AOAM53003/dtmEOQtqx2cqNLqgv7vY0dp88bkT/S575k22tzVzrVFREc I2SJPfnddWvM3mIEwmJQ9wYpNyJNX4EOYQf2EJrU4v9cggp0GjbM14Grba+4D5by6S3BlViS1op lAwaNKGeKrQFpoXOuE80SGpZmKnbAVxD2C38o1OdzAg== X-Received: by 2002:a63:2b88:: with SMTP id r130mr9716786pgr.80.1638452796305; Thu, 02 Dec 2021 05:46:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJyLU25anA3fyp42sSVM1Z3ldPpzjUji9gi1bc1heXNfD/pNHQ9AgeLCjVN8LnKhdO42Uz+Hyw== X-Received: by 2002:a63:2b88:: with SMTP id r130mr9716771pgr.80.1638452796058; Thu, 02 Dec 2021 05:46:36 -0800 (PST) Received: from localhost.localdomain ([69.163.84.166]) by smtp.gmail.com with ESMTPSA id a11sm3517258pfh.108.2021.12.02.05.46.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Dec 2021 05:46:35 -0800 (PST) From: Tim Gardner To: kernel-team@lists.ubuntu.com Subject: [PATCH 7/9] nitro_enclaves: Add fixes for checkpatch match open parenthesis reports Date: Thu, 2 Dec 2021 06:46:20 -0700 Message-Id: <20211202134622.14875-8-tim.gardner@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211202134622.14875-1-tim.gardner@canonical.com> References: <20211202134622.14875-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:46:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Gardner X-Patchwork-Id: 1562731 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=FR5xqnCl; 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 4J4chL0NDhz9s1l for ; Fri, 3 Dec 2021 00:47:14 +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 1msmQO-0006ZJ-Us; Thu, 02 Dec 2021 13:47:01 +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 1msmQ4-0006Eb-4p for kernel-team@lists.ubuntu.com; Thu, 02 Dec 2021 13:46:40 +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-1.canonical.com (Postfix) with ESMTPS id E6FE33F1F6 for ; Thu, 2 Dec 2021 13:46:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638452798; bh=GROcg/h9vF5b2JjqXVKaglD40irCJs7NOGJ0ywSv3tE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=FR5xqnClB1l6AFKMXMWTeOhbF+NEEBgfx6Rki99bs6lB/xkmcBXltoytTbnIjiBy5 ovcA4WNo52EetjS1hjG1VbjCmgCnTO+YJY1EGjdnCLOLD4KP4t9TDOBeyA1x6Hr96P 24lmFMp57qEbIaOJoRRThodjBxwMXZrMojbTlQ8dXzW195AbEQ9+17phrUHokuV+9r 3q/h4IMVqCLB/JlijG8HxoDGUmHnB186f+6KsgoDFfumWLwdO1b5HpZkd69BrTnTbm Z/V5umdRpOK36Sio09K1G8yJi+7H69uK2/814r4L+W6tB6gMIvYSXz0wJF3KAOIGIw MYUihWsyV0lTw== Received: by mail-pg1-f199.google.com with SMTP id v3-20020a63b643000000b003255b6cb43aso8831399pgt.6 for ; Thu, 02 Dec 2021 05:46:38 -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=v18aJGovdIFwDKBnx+NF7fbH/a9/USfqWLgmFyBT6VLv3wNnixG/VjRnrA4QyROT9C KesQ5l5yqszO/w78QeXHW0d9a789GxxvyeoX+fx0RyB48JAnQfUbhAb4Pc+OdqsD5iY1 1zAdHmd5/Ns0mI/wsB6VYYhlpTwusgODKmsIF3LtOQL8l3qlOcHL0bq2bYQ7i/IKfc6e PkEIDtRUAO9DsV9J52KxpJn7X4lHwx2uQq4cyIA5oMXyWlc0YB/seVcAljQ2CZtsfC1D llrCqGYyy0jEEqrjMvzdjZN7vXd09h6cndF2UmZ6w822ZQp5KTsGvdDhc/RwfdNjfuB2 sHLA== X-Gm-Message-State: AOAM532MYQ2ikK9TDAmR/U59drRXJXHOFqeUX9nFoCxosgVAE2eq4pOo DEw9g2mUg+OsA8kQlQWyBEaIbdf7SeedTuPjxh8sVCM436pZPWO0BhKRUafvb74Bs6ZtcxMrBYh QERI9mps7JSgxzIr5rW4IjONou6lFKIRpFe5OjfzGIA== X-Received: by 2002:a63:790b:: with SMTP id u11mr9491445pgc.71.1638452797255; Thu, 02 Dec 2021 05:46:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJy5/VSXGiUTGDkFaCQZ32XEG/m8CuHzpeh6R2hplP401Gc704Q8zFWHLT1pfAtzszMLkbnwLA== X-Received: by 2002:a63:790b:: with SMTP id u11mr9491419pgc.71.1638452796955; Thu, 02 Dec 2021 05:46:36 -0800 (PST) Received: from localhost.localdomain ([69.163.84.166]) by smtp.gmail.com with ESMTPSA id a11sm3517258pfh.108.2021.12.02.05.46.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Dec 2021 05:46:36 -0800 (PST) From: Tim Gardner To: kernel-team@lists.ubuntu.com Subject: [PATCH 8/9] nitro_enclaves: Add fixes for checkpatch spell check reports Date: Thu, 2 Dec 2021 06:46:21 -0700 Message-Id: <20211202134622.14875-9-tim.gardner@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211202134622.14875-1-tim.gardner@canonical.com> References: <20211202134622.14875-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:46:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Gardner X-Patchwork-Id: 1562732 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=XHvFRMZs; 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 4J4chS5gGmz9s1l for ; Fri, 3 Dec 2021 00:47:20 +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 1msmQV-0006iT-GA; Thu, 02 Dec 2021 13:47:07 +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 1msmQ5-0006FF-Ap for kernel-team@lists.ubuntu.com; Thu, 02 Dec 2021 13:46:41 +0000 Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) (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 908313F1F4 for ; Thu, 2 Dec 2021 13:46:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638452799; bh=VRwT8gojvqDbxUZr1DO1Jg9ooXCYZM6sRtWeV9yZIOY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=XHvFRMZsQl7FEsAiKnf04dOQ68EEINpQZhxCSPAzQlim5I/aFbKbObCBK6HQktkrF j2srZjQG79ruIRMKJ0h2NcNUzO2abgLxJ9r2lI4GDnzdaDFXkZJmElJyCtyhWxtqAs QABNXhKZ4Lq4MnvQXSUqbouEra80D3KIkIEFCSXca+Pmwmu7m9rR5RqT8XMNG+QTqU YECoQ3T+Km22XG2tcmrN6vw6NHUX4fCMKIP7JTTKC37WOjwQL+Vp08STwgKSbXYffk meEE1e5hr4H+t/vxRUgI8/WWCUzkGu8ClapUN8K45LbsAmarR1CZC+R91g1BSYeWcR VSymvniinMPCw== Received: by mail-pj1-f69.google.com with SMTP id p8-20020a17090a748800b001a6cceee8afso10638253pjk.4 for ; Thu, 02 Dec 2021 05:46:39 -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=7Zq4DYYcb2q3YQHjZPudMrp/hVRezmuFEXybQ5C/IjazjHQ8zYp74S+WEBs14N78R8 usJM71yaAT4xzU2TVHtpQ8fuwzUJYOsRIQ4wCvOmVGpfNXn3Eq5zrJi8dL3d6GWz618z 8k/VPqiC/5hwdvPGCDpIFN6UOQC+zH9F5a+Mi2CaS6JNWLz9eeNa7/azb+HsTvJE1vww V59FT9AxJBKFWeiWYS1k6voHzqmsDC+axqpLAxWCA/YUfLpEQTfFt6HsOjQIOkXVWfha 1bjbzvc/kkZjaYZFD+CfAszM7LVfFQ720Q4u8VtEYPH7HDZEvR3EFKr2njfaJALLOxfK amqg== X-Gm-Message-State: AOAM533xKym1rHH0kGUxZfC9W+U+riOcmyPkW+Neb4qfORwALQ7TpSt3 YL2+SBHTNV/Bk/kiBnEk0XUSguPce/URurwKxJS34CiuJPWiFBRRnqSubuqQ2VNF4+XlbPU4qEE oDbe+CKAa/ph5YFkdYYIvC3za7p6VqHkO86Uppv7y6Q== X-Received: by 2002:a63:1e1e:: with SMTP id e30mr7436311pge.153.1638452798010; Thu, 02 Dec 2021 05:46:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJwkSvCOhl3nzYsAPuTN701UwXePptXYa/9Ou1e/n2KvcP3/Gl/LXqmvH44Sz62p0/EWdpBjEA== X-Received: by 2002:a63:1e1e:: with SMTP id e30mr7436285pge.153.1638452797817; Thu, 02 Dec 2021 05:46:37 -0800 (PST) Received: from localhost.localdomain ([69.163.84.166]) by smtp.gmail.com with ESMTPSA id a11sm3517258pfh.108.2021.12.02.05.46.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Dec 2021 05:46:37 -0800 (PST) From: Tim Gardner To: kernel-team@lists.ubuntu.com Subject: [PATCH 9/9] nitro_enclaves: Add fixes for checkpatch blank line reports Date: Thu, 2 Dec 2021 06:46:22 -0700 Message-Id: <20211202134622.14875-10-tim.gardner@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211202134622.14875-1-tim.gardner@canonical.com> References: <20211202134622.14875-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; }