From patchwork Thu Dec 2 13:20:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tim Gardner X-Patchwork-Id: 1562712 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=nQuPpsb0; 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 4J4c5b0QJLz9sRR for ; Fri, 3 Dec 2021 00:20:35 +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 1msm0i-0001U4-O0; Thu, 02 Dec 2021 13:20: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 1msm0g-0001TM-QZ for kernel-team@lists.ubuntu.com; Thu, 02 Dec 2021 13:20:26 +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 726183F1B1 for ; Thu, 2 Dec 2021 13:20:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638451226; bh=dAs19Oppp63KDaeR9B1NiePkxjx5xPvH2cf7paOklQY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=nQuPpsb0Oj8FD5mxpVaIIQQpriFDDglQQuO0QtrNI29qcwh4Bv4nM1sNfa6RDpGa5 J+lToKwPljSIeTAZJqBLpDlRren8OBZ7zoh6vyQZ+F8Izr5LycXdyNT2V7GYBgDYon vDxUHV8QI0zS13ycZzeAITQxk8mF8yEmIyEGJrFNduwn6vyv6PoPc4UFyr5TpFnm3y gMHRHrH5KTNr6xH0K/bYbv55KRc6hdzmyNsf1KD444kJjCbKPMkK9AFH3VXYZDGnyf Yl8cceX0GnCwc+BuGalkPG6XlZ9MESkU3uMpTWniwQ2j8g8C/CaTh5bZHEt+d6oO7n Dj9PtCcKzifXw== Received: by mail-pf1-f198.google.com with SMTP id q19-20020a056a00151300b004a4ca777976so17390168pfu.19 for ; Thu, 02 Dec 2021 05:20:26 -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=anaH72K4Bj+TkIT5tA+twna+mJRQEHrt5y7KJ+BMH+ZjGc4b2WTIHrWfKM5xOxs6jH MDosF4KTBeXngmQMj1QJ+lXWihcot+SVhe89X7G8hdoIZhe1zUYZimv9RDwSyNWScMRL UIdXdrvf7lpJn/D0DqG9AKs+4oicGLva7+85RpoX4mjdUfuXmNClSTMVoGoy0WThQjBv 2xzOyJJIOKNmjjF5NBTITXn2zDxye1iIYs1qhyE+KechiTmYaTuVDjsWYfcPsqNLdByh CxlOWTMT90IZM588SMeqXI3N2fz+jI85QlVuoWJsnibdL0HBJ/RONgziOW/FTTvPAoSO SSJA== X-Gm-Message-State: AOAM531z6gha+vSWwfakDY/IgElBnFZwxkhRrqafb+8DIy0re43CrHaR vsplZS2uwekubdr4lyYgIxUoun8ZAzvPHaBHc1CELAI+cgqqcGdFDW1NLI6MzLLIAK4X4WyBjvR 5+tuPSZNZuvVymMpmIp9HUAptURYLUz8Pn3eJGgzQ1g== X-Received: by 2002:a63:f654:: with SMTP id u20mr9553596pgj.187.1638451224881; Thu, 02 Dec 2021 05:20:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJyggw1pjQ5p/Gc2HgHMCE6PIYyI2ok8u8rVMz6ieAQHdsXrdZ+HpC92DXk1mbfK0vF3QUphVg== X-Received: by 2002:a63:f654:: with SMTP id u20mr9553584pgj.187.1638451224682; Thu, 02 Dec 2021 05:20:24 -0800 (PST) Received: from localhost.localdomain ([69.163.84.166]) by smtp.gmail.com with ESMTPSA id r6sm2762803pjg.21.2021.12.02.05.20.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Dec 2021 05:20:23 -0800 (PST) From: Tim Gardner To: kernel-team@lists.ubuntu.com Subject: [PATCH 1/9] nitro_enclaves: Set Bus Master for the NE PCI device Date: Thu, 2 Dec 2021 06:20:09 -0700 Message-Id: <20211202132017.9688-2-tim.gardner@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211202132017.9688-1-tim.gardner@canonical.com> References: <20211202132017.9688-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:20:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Gardner X-Patchwork-Id: 1562713 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=AZE9UmiE; 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 4J4c5c19Pgz9s1l for ; Fri, 3 Dec 2021 00:20:36 +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 1msm0k-0001VO-1k; Thu, 02 Dec 2021 13:20:30 +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 1msm0h-0001Tg-TD for kernel-team@lists.ubuntu.com; Thu, 02 Dec 2021 13:20:27 +0000 Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.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 AD9393F1B1 for ; Thu, 2 Dec 2021 13:20:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638451227; bh=cbiMuYM1nDWDvXQi0axeY4baPbCdzaL4u6NhKzei6bA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=AZE9UmiEXW1k/39Ye7PGZdu4AsY/JU0309TykNPBE0myUIMMR6ufA8LLoAeJxKoPr ztIYLyRQw52c5nd1KhVC4WXUyfIqzVNQhk9YeTdqq94zhiCOFieVjClh+nkLiNqV5M j1K+AI/CGw3a3Vvx5shBK1WaKYHiIBLLv14SbbgS/LvycKkvL/BwvzeMS9KnAEPmRe o0VVX+WYAsXANeJj4nq1Fgc2cQFTvb911B8SIjFxbhpFfBO4EhLdsgpp3og76CxgNJ h2tMHUNR7D1p4k8Nnk+fl5OEanjxiGAF5oLKLG8nPIwmP4qf33SdJ63tNFLM9jQzs/ Fre/kP77NUakw== Received: by mail-pf1-f200.google.com with SMTP id q2-20020a056a00084200b004a2582fcec1so17401436pfk.15 for ; Thu, 02 Dec 2021 05:20:27 -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=cbiMuYM1nDWDvXQi0axeY4baPbCdzaL4u6NhKzei6bA=; b=6h7HpijOB54lu3CxxSpCbs27Pmz8BKEmNHKjkudIQaSzDAS7PtBbELxc/Gqpdxgr4e Sp5KWdHepDsAzISXN4MLuzFNLstO/v3Lk0Q15UwtuZaRMzlsv1VXchl45FdjKBruKg8D o46vbqdjf6YN0uTcNngwN3ynODZbqjeH/qu1Si8LP5dV9DSLfwnhDjV3ciEIMtdQ4unD ymnbjoJlbBKBZQv9eqYglS6nX1jm65kcSgJ3i08Vgu7NvIMhE/xne174oZU3hHHaT9Y+ sMnAH8WbUn82iorD+qmwNY7oB/o9BqeUO5dhJl5wqy4ppU5+f32N4YV8+mdW9NpUq2NI 64pA== X-Gm-Message-State: AOAM533sA7bT3iqZ196RoWWK753HDFJ/UiuOYwvy9dQcQYnxeOOg3Yem RXDG3sfALHY3+utnimT2D1PZSPgs6zvCMNy9GMiU6+uq7mHrnSUD2Y6jFUBxkN9+4Yr52WvqbLR WJOWRWEP+Nk/INHoCvabu5tY5pZaNcP1bYjta/wr9vQ== X-Received: by 2002:a17:902:a717:b0:142:76bc:da69 with SMTP id w23-20020a170902a71700b0014276bcda69mr15354980plq.12.1638451226013; Thu, 02 Dec 2021 05:20:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJxuTXghdHzDofxtsCe8bBmN6+aTK4KUQeYXQGkhxyP3jTgYjD7QbBSZy1CjIq0Oj0E8b1GiIQ== X-Received: by 2002:a17:902:a717:b0:142:76bc:da69 with SMTP id w23-20020a170902a71700b0014276bcda69mr15354967plq.12.1638451225809; Thu, 02 Dec 2021 05:20:25 -0800 (PST) Received: from localhost.localdomain ([69.163.84.166]) by smtp.gmail.com with ESMTPSA id r6sm2762803pjg.21.2021.12.02.05.20.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Dec 2021 05:20:25 -0800 (PST) From: Tim Gardner To: kernel-team@lists.ubuntu.com Subject: [PATCH 2/9] UBUNTU: [Config] aws: Update annotations for CONFIG_NITRO_ENCLAVES Date: Thu, 2 Dec 2021 06:20:10 -0700 Message-Id: <20211202132017.9688-3-tim.gardner@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211202132017.9688-1-tim.gardner@canonical.com> References: <20211202132017.9688-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 --- debian.aws/config/annotations | 1 + 1 file changed, 1 insertion(+) 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:20:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Gardner X-Patchwork-Id: 1562714 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=OrCt9hI5; 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 4J4c5f0BDjz9s1l for ; Fri, 3 Dec 2021 00:20: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 1msm0l-0001Wc-2f; Thu, 02 Dec 2021 13:20:31 +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 1msm0j-0001Uh-T2 for kernel-team@lists.ubuntu.com; Thu, 02 Dec 2021 13:20:29 +0000 Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.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-1.canonical.com (Postfix) with ESMTPS id 460883F1B6 for ; Thu, 2 Dec 2021 13:20:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638451229; bh=Q3+HxD472D2nmmx+zsnUJnq5DaYonj6QF6L04KG3GHY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=OrCt9hI53AvksIZbwqvRZqGiOI5jsSQWxEs8RZpVTV2ZT1JNpn6CCfT6pWLvlWO/n 7K2cjwGiOhalz0OLbqFPm5jSVoOaIIPU/klPwgINSuh8lXGLAXoc/HIMpBMy5hyHkq JA9KskQAAasjYLudfvhX84i56+KEjHJ96mDk1wclQ0VLYXCnPFl7EVrUcNRAJkFsRU RKFk4SJ7UVBLlOTh9C5vJv9zbW+392Gk68VETKC3+DnyUcM4Ax2TXOhbYq/V2V6Um9 S/mHbH40sMKRZQQNm0bAjithGdYzN2QuqOuxF0reJSG/1iv6q7BqV7cTwdz7yNOazE 285uC9kkWO1uw== Received: by mail-pf1-f200.google.com with SMTP id w2-20020a627b02000000b0049fa951281fso17396297pfc.9 for ; Thu, 02 Dec 2021 05:20:29 -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=frVFyHFP9bWuX59gtKiZro/sY2X80TOQ09C/OZS3Z95b2V/9TljdEPAWqoyY8fHJw4 fMkte4o3tliyyArbBc7sKZtViVZ3cFz8TvO4s0uu5OMwtlAKeNe6WwkVfPrDGPQExHb1 RousPDElbBtaGq95kvb+AW5Rh9CYrj/cYCyzp3arad5VvzZTYre5RpiHED8xHabkPSly QttFbmDpoR0ctzyuwqY2DPKBKZUqYH1PKK1oy4JUwyjU6gXNzY1vpa/FoI4OVTLtaUIY GSe+o0XD8eLhz9AtD4KPcu3iOO/bxpSflsHm4YCPMcvQWHtwo6OLLhhlDk0mV+DmjKxg 4q7g== X-Gm-Message-State: AOAM532SNI9bZhMEn3ed7+ELBMg7UJ6ZOR8eoEu4bCz8Z1c5pscilhJL xn+7wTxDVm/Pi1zyiL901Vd5cZza3Pwr/KGT4t16xpkpMuXr8WaE1WnKvHY7/+gfgs5GJCVqjgZ cOkgHN0Qc67RDmMWlQH7UvqfAXJfyvDmCtSY2187Dng== X-Received: by 2002:a17:902:c947:b0:142:13f9:3444 with SMTP id i7-20020a170902c94700b0014213f93444mr15364599pla.82.1638451227138; Thu, 02 Dec 2021 05:20:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJxA0b9IEWZPvNpBgmk6ZzNYaUdlbYaIxEfQVhVD6kSkm2GprDGbGUlijHB4N9Rf2M/YQFN34A== X-Received: by 2002:a17:902:c947:b0:142:13f9:3444 with SMTP id i7-20020a170902c94700b0014213f93444mr15364581pla.82.1638451226915; Thu, 02 Dec 2021 05:20:26 -0800 (PST) Received: from localhost.localdomain ([69.163.84.166]) by smtp.gmail.com with ESMTPSA id r6sm2762803pjg.21.2021.12.02.05.20.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Dec 2021 05:20:26 -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:20:11 -0700 Message-Id: <20211202132017.9688-4-tim.gardner@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211202132017.9688-1-tim.gardner@canonical.com> References: <20211202132017.9688-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:20:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Gardner X-Patchwork-Id: 1562716 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=poHJ/i0z; 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 4J4c5m2Jmnz9sRN for ; Fri, 3 Dec 2021 00:20:44 +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 1msm0p-0001dK-Kq; Thu, 02 Dec 2021 13:20:35 +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 1msm0k-0001VR-Gl for kernel-team@lists.ubuntu.com; Thu, 02 Dec 2021 13:20:30 +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-0.canonical.com (Postfix) with ESMTPS id 04F563F1B1 for ; Thu, 2 Dec 2021 13:20:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638451230; bh=5TG5mAHFUkZm+5l/uVLtvJGZbjuCZEh99Q7y9+CRV1w=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=poHJ/i0zy2TvkBQlYU77Lz2HZ9PPEX9mPZ8v+kB2zcEGfnZ/MeefLzHmn5vE2Dhes ag/q94otcJ/TXVuGsBrgciAuzWjY7cia17HiRhAqt+JyHAV4FzkqKOhG3pD4bG2iHC xjidF7b11lRdDvGO7DlD3vJdIuNUFewUvSl9u6zqWnoNhCqNzgHbJ1RiJh42GU92/C 1xL/d/ORx7WEpOT6n02CJoOUV3r6AwkcPG28kWO29c1b6ObniJRgRX9G7Nvk/hROqZ qE+fTXUpOpsM9eW6G0dz+u8Sk8EHoRgwY4tQUlIRRzBC9eLMbwd+5uEkUKh1EJUMGk Kgkfk0q3WRuXQ== Received: by mail-pj1-f71.google.com with SMTP id gf15-20020a17090ac7cf00b001a9a31687d0so10599297pjb.1 for ; Thu, 02 Dec 2021 05:20:29 -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=RphfHXno6/QWha8lDdKNAwtlNRlnEUVS2fZ/HmXAud3UC0mBlfvnn3yZCBiy3GtOx4 AKFTC8F3lgyuh/LOpqA1ty9EOE1grPeT34MSDyRhcdfif8vZ99LRhLva91FOewXD8poY XHPZOd6QUYoHwlBUcMeeQX0NoFvqeWRZjvhQ6B0rwr63ZmGwzhj42CeJAeQQ/FBsA/+1 O/SAnELENfoZnfMILFlBS5AaWVaDNnywatenz7ZfIsrSah1HYP2ip/NtM8sFnIVQlcJi OYVVvg5xZBK0+rP5kpTOZL64+jMazHOMxGNG/LzX059LBUqrhHETD9gqRh8EmhwX+qGB x5SA== X-Gm-Message-State: AOAM5317aNIV5bFqknVIqKNk0GuS3ZkRhfEmad2f+Q9ssMjINK+p296h xJYgkbFAyZM9qaC4x7jdgpwdWVYSczlf60K05hstjg8IXYoyIHjR8XldS0Rl/ONQI+lnDI+qeOt 1OMq8sfy5nCHZN/5YiHbi12+NT7v4vEx3vWfsDh4Gyg== X-Received: by 2002:a65:688c:: with SMTP id e12mr9767124pgt.37.1638451228382; Thu, 02 Dec 2021 05:20:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJz9FTWiuYiwIeEEyonnPzUjZ5x4XIAuDGZzHiKff/kkuXNAeskJJOszk2TbTqkue2Bunsn9CQ== X-Received: by 2002:a65:688c:: with SMTP id e12mr9767100pgt.37.1638451228052; Thu, 02 Dec 2021 05:20:28 -0800 (PST) Received: from localhost.localdomain ([69.163.84.166]) by smtp.gmail.com with ESMTPSA id r6sm2762803pjg.21.2021.12.02.05.20.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Dec 2021 05:20:27 -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:20:12 -0700 Message-Id: <20211202132017.9688-5-tim.gardner@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211202132017.9688-1-tim.gardner@canonical.com> References: <20211202132017.9688-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:20:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Gardner X-Patchwork-Id: 1562715 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=C9qS05pB; 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 4J4c5l3Xn1z9s1l for ; Fri, 3 Dec 2021 00:20: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 1msm0n-0001bL-Nq; Thu, 02 Dec 2021 13:20: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 1msm0l-0001WM-BJ for kernel-team@lists.ubuntu.com; Thu, 02 Dec 2021 13:20:31 +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 A99943F1B6 for ; Thu, 2 Dec 2021 13:20:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638451230; bh=0Jl94UZvXcVlR/1XFp4/HD0+ns93auqlDw3iuexYO5E=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=C9qS05pBlzvNPQPxf8zGtObajKmK7M/wbUteq5cAnJczgW6hBnK2TthWkL5ZEia0p SvWZB/FUB4/EpQ7wqQkTpH4ZQDzkG2qJEHvPWj3PiqBfRSTpyCF7YI/RxRofkYX3Mk 02MML3kqsDytGdJuBqnqzckNHyj5SQh0LeokyAi47hrxs2Ke02AT8wy8CZlsTrJYPU 00UNf7HbpY5dwfGCvvl5pbw4EoQ5jhaByVlaapjzwEajH9dzgFeamNSb3g5MR0g+eu nD80z4mMtgshYfRgstEArbA2A9L9UO/nu4DRU6gQz1ECoFDghPszeeC8VUBGFDiRCv qUgn2bt37dKcw== Received: by mail-pg1-f198.google.com with SMTP id t1-20020a6564c1000000b002e7f31cf59fso14084372pgv.14 for ; Thu, 02 Dec 2021 05:20:30 -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=DwYtDaQ9d6gZ412uuJOAZqHPQwQJjyg5uFUjQnRMU94GQnIXbFDhdjgrr1QpWYYpxS JNUz7GP2zVgX4Xj2qhr4zW4c1i8xphJvsrqk4Oiu8jFZ40/DlXOjWe86Y4/Z5kWWlhFT v+2hVfbCB4jb/YIB0pNxlsKN20nWmrIQbZVlV4G7wKyzd/rTSeqUOrCl3oXZeDfYJHCq LybmNZ7OyQqFZ/9lcTw84nm8efz+72WZe/7+z74ySFk02veidDpY4xi8gv2uf/DlQg/p 55xz0f/VyVyop+6W6pe+xL7okpGYzc3JY9CgjJ7avOeaWEO9dZ86dNdHmOoVN+wBVw9Y S76g== X-Gm-Message-State: AOAM5315IYJJIHJ6t3ASOK5dzDcFsxrNc/Q9U+hJqUOBSktRv0PljvTL a1JDZjlEFh9QPp89RBTb2A6PcXPCV7LlTGW3CelwkEKa0Sq+Md9OrjUNjOJpnvjFzOTmew+qoHq R5RmdW/TTNhCTeO51yqpP71/PRBoBq1d5SYkYTb58xA== X-Received: by 2002:a17:90a:98f:: with SMTP id 15mr5890699pjo.166.1638451229126; Thu, 02 Dec 2021 05:20:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJwAs6xnQAxknnnD7PrItUQ1PKGBt+AUwAJAUV8V9inTrWJfKQjPO36QqHfYXYdlz338Icxv4Q== X-Received: by 2002:a17:90a:98f:: with SMTP id 15mr5890672pjo.166.1638451228841; Thu, 02 Dec 2021 05:20:28 -0800 (PST) Received: from localhost.localdomain ([69.163.84.166]) by smtp.gmail.com with ESMTPSA id r6sm2762803pjg.21.2021.12.02.05.20.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Dec 2021 05:20:28 -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:20:13 -0700 Message-Id: <20211202132017.9688-6-tim.gardner@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211202132017.9688-1-tim.gardner@canonical.com> References: <20211202132017.9688-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:20: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: 1562717 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=Yb8p4KYO; 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 4J4c5n6nN6z9s1l for ; Fri, 3 Dec 2021 00:20:45 +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 1msm0r-0001g6-8l; Thu, 02 Dec 2021 13:20:37 +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 1msm0m-0001Zl-SD for kernel-team@lists.ubuntu.com; Thu, 02 Dec 2021 13:20:32 +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-1.canonical.com (Postfix) with ESMTPS id 556AE3F1B2 for ; Thu, 2 Dec 2021 13:20:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638451232; bh=RGeUF0+9H6b5g0+URRGPMdmkAlz4Qv0G2HWCz3aHci8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Yb8p4KYOwmKJwabww+hu8CowjrBm+Mx+z5cKIvx/GQQVI/qLu6aijQcQTjKCLKKVt nTPSouW8JRMAk03REgq9PgOm4xLc1txg2sYmGhrr/7dpTJgTligzfcsFJZpmytIKt5 i7Cq+GJGGo9gaPiqwMGb7Gds+gxyTtQ9OybuEfeimf8XKoJm6ZxFhcqIP78X0fQ+hy 9VnErWETWl087rqCP+/Jt+nUtJFLD8O9V8/0c2fjtLJTQV0U3GJVQr2rq7+/QnE/UX EHUR/X6993WV2sKjDVS1M8Kq285OMFGFip6bPy36CH5WjnN8iaSluGesOLuufo0deA //L58OG84Hpig== Received: by mail-pg1-f200.google.com with SMTP id z4-20020a656104000000b00321790921fbso14100667pgu.4 for ; Thu, 02 Dec 2021 05:20: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=RGeUF0+9H6b5g0+URRGPMdmkAlz4Qv0G2HWCz3aHci8=; b=EdLAx48Z3Ko6HW6lTOuTBAauP7OXdRoDiBcIQJ8JlwheIreRjpTjoXJD1ZOqtMXYAO ZAfNLtk9s30udAyJdUu0n1cPUF0j/RxEWCjs2psNsGm3qK8tQ+PqPh9Ini7+6pPMU3mg funuf4aq/dGLd0s8nAGnf80z0tttDCdm3Hgo/rG0PfWrrc7Fas3gWlnKa54kFHmFUb4H Fsv2sIcSPbP5Dco1NHcXZoRPy/aZDhRhNltozpMX0h/6knDJ7s2fQkyvWnLojvy02LnE 2xRBeFNUEm6q/MtWaVayTHa8BstOz8DjnsxbSPxX+K0WCBTDzdM565EyvJ/r1MtrFA2E UpgA== X-Gm-Message-State: AOAM5314M3x/jzakDtBjt/Sxc/MhSD4FsZ7JdVUUxVTpitax2GdmoMbc elq8DIR297VW4ax1SJNcEtba/qo90DVxN1Oghe+qTUl9iM7itkQb0VgbVC4BEczQqegtSBvs7Xv Ph0uu2GkynJ2J1vaVnlhX6na+igz7lctWQP5Xmmk2Zg== X-Received: by 2002:a63:8c1b:: with SMTP id m27mr2764864pgd.399.1638451230797; Thu, 02 Dec 2021 05:20:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJwhBPZa3dg3NeJKoN/e8IalN9z5NutpLGq5Zb83LLr0jMZSHmUD6/Gp1ex5QQ+uyADMkjnPbw== X-Received: by 2002:a63:8c1b:: with SMTP id m27mr2764846pgd.399.1638451230532; Thu, 02 Dec 2021 05:20:30 -0800 (PST) Received: from localhost.localdomain ([69.163.84.166]) by smtp.gmail.com with ESMTPSA id r6sm2762803pjg.21.2021.12.02.05.20.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Dec 2021 05:20:29 -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:20:14 -0700 Message-Id: <20211202132017.9688-7-tim.gardner@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211202132017.9688-1-tim.gardner@canonical.com> References: <20211202132017.9688-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:20:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Gardner X-Patchwork-Id: 1562719 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=Z1JgFkNy; 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 4J4c5v74Y7z9sRN for ; Fri, 3 Dec 2021 00:20:51 +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 1msm0x-0001q6-N6; Thu, 02 Dec 2021 13:20:43 +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 1msm0p-0001c7-Bd for kernel-team@lists.ubuntu.com; Thu, 02 Dec 2021 13:20:35 +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-1.canonical.com (Postfix) with ESMTPS id AA6423F1B6 for ; Thu, 2 Dec 2021 13:20:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638451233; bh=0D6SOC1covvGGG9WDKcsofKKEmSI6m0AN3wluF7v+NQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Z1JgFkNykWI8667b0jZFQIBpwp3yh44w3DGCLJcwrw13aO138qolVuXWue8uHbTG3 hsSGaK0ea6kDeTTil1aCt7yTvXsPldaU3E9qF0D4wfR9l8t0Ujn5pAOZT4u+pFm5tm xjIBdUsnwg+kTKkRM0rZ+F7IcfDa9sLv45zcX1FFreMZktu/uQnNDib8AQ4Vn9wniD cjBug1YSRwU+1TZ79OT8gXUhdmFoHBaR5nKzJJDksgBv/lNPohr9cpVrxiOvRkuazi LBtK+H4ajuRSXfyn/ZhfW17+7sKblNKjzrnXzZqq4bKik8fDM1gWPCNpd8gCMKyGff mWUy4JQpQ/4dw== Received: by mail-pl1-f200.google.com with SMTP id p24-20020a170902a41800b001438d6c7d71so11676977plq.7 for ; Thu, 02 Dec 2021 05:20: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=0D6SOC1covvGGG9WDKcsofKKEmSI6m0AN3wluF7v+NQ=; b=My+I0PJ3p897om1XsZ6/a/m+5Bv1sGaxooFl1WYDKLZk0TXm1zKbBkX7mNMde23C6x k/5nsgOHDPQSBsYqm2G7OdkfHLlyKwGglKvAVO+jfzr5+xoadcQv5KBNUMgRa+yyUe7t tUsOchhDAzohPky1dLsnq630d/nQKqjl5kWYuJzak1i6RRRJIwIGuPQUnf7BVEOeFG/d 9kAFO2/X45Ahd2UUeADptif8yrmkRIVdgBhIlxaGXOsuxjFOI80EQotq61jHmhzvFCA/ OKdE3H3pC12e7IQVPrntzu8yy/nvCG2s5ZsPtEQxg9RbMSFiYVlrJqP9JSI0zJwMvL+a YD/Q== X-Gm-Message-State: AOAM5319GABTFlgJ4mmB1//a7/L8NuHOSam0C7wV++rk2nBZ6JswcFNM zpsGuE9GCq3LUHdw6AzaJNkPvanZDT3gSAoYFnPADBUo5o7OM541qX+kjaGPncGqO5hLmK7uguI hgN8YO8JXRbQlYx+ZIJvLkN26XuXJq1gysSHVgWZNSQ== X-Received: by 2002:a63:ef58:: with SMTP id c24mr9718431pgk.94.1638451232068; Thu, 02 Dec 2021 05:20:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJz5V7kKAT1krKNUSuuJQ28MWAllcl36p6N7aQ4cPiQbBLe/pKdWXWiN2pWeGAK3vbpUx8rCyA== X-Received: by 2002:a63:ef58:: with SMTP id c24mr9718407pgk.94.1638451231759; Thu, 02 Dec 2021 05:20:31 -0800 (PST) Received: from localhost.localdomain ([69.163.84.166]) by smtp.gmail.com with ESMTPSA id r6sm2762803pjg.21.2021.12.02.05.20.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Dec 2021 05:20:31 -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:20:15 -0700 Message-Id: <20211202132017.9688-8-tim.gardner@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211202132017.9688-1-tim.gardner@canonical.com> References: <20211202132017.9688-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:20: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: 1562718 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=SfF3+aM2; 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 4J4c5v48Kxz9s1l for ; Fri, 3 Dec 2021 00:20:51 +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 1msm0v-0001me-OZ; Thu, 02 Dec 2021 13:20:41 +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 1msm0q-0001df-JZ for kernel-team@lists.ubuntu.com; Thu, 02 Dec 2021 13:20:36 +0000 Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.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 C0B863F1B2 for ; Thu, 2 Dec 2021 13:20:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638451234; bh=GROcg/h9vF5b2JjqXVKaglD40irCJs7NOGJ0ywSv3tE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=SfF3+aM2ENGGV4eZzK7oh5N9YaqpdW70fwmUQrNsF02JkLEGMXcdbUh7sB0G6Ulgt cOB7GGW4/nL1R5hIvLfmjH1fYSHixdXPQjG2AWRR8TV1yOw3AMO7upvJ3I7gsF/+4C /SIML3AKdoRhxk7igGIpOoRGaxPgMuo4tkqOxPE4ExbqZl+uObx/zosXim75B4IGU/ eegLlMnW8kVzNB+XM2ocq794dEHgumMr4oes0sjKDIFrvF7RjAicGFPYfKQUT3+r1P 3NLzDuYBF+E9kHt2m4vslc8/ZBrjxUhnv1s+aCVV9qBy5c65oWMZQ1JOZW5b8qUKAu aAyYve3KmT7AA== Received: by mail-pf1-f199.google.com with SMTP id f206-20020a6238d7000000b004a02dd7156bso17417341pfa.5 for ; Thu, 02 Dec 2021 05:20: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=GROcg/h9vF5b2JjqXVKaglD40irCJs7NOGJ0ywSv3tE=; b=lxQJi6tVZFJAJCHeVZMfpf9xVItllXk6B+fjmSG6iM/dcUq7FMFxyLNZuRr5kg0uuC g4UkGOgXhjkqwhW+vWxNN6tYyJz0Pno/BO8NHlykqyL/y7JSZ0xaj/l5PCup+QMAuT5t ozXtkAcc33IfiwehGXYrrtQRdVNKkocTV0Bci+FLI+Os4I5sSqPkQs5/PqltRaVMeFLh 13m4H40N11ht5SwOTMLQmSkSHpXu2/AVd6Ct8aTHPKzA1bBMqjVkma5U0u2/n9iREpBM wa879SvvoesQZJHU4ls4Mj5a2HU+b0yybGUnZCc/+6c5eOnwucq9LMCuIW/Kljqztq2s aK+w== X-Gm-Message-State: AOAM533rP/yylWxt8eiMI76h5OwmwUhd/ZNoUhIch7QLJ92NW+AGwUrO wYhlOL6e4Wj29b6zCyue44M6kihGeyEiS+9viiK2WX4V03x66JBp+Ybc0oXuG7ryoE+KnBF0geY +8IOaRVrHLhMUJzdPF/FvZSbqg9h/g3iOjggV62Iaug== X-Received: by 2002:a63:681:: with SMTP id 123mr9548791pgg.548.1638451233175; Thu, 02 Dec 2021 05:20:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJz/3F3geZ2bWCZvIRxN4zz5Oav2Y+ubHPGSCIcPVyEfH0xRRkxmBAm+2DCHOpTEU0vnlWu7Pw== X-Received: by 2002:a63:681:: with SMTP id 123mr9548771pgg.548.1638451232909; Thu, 02 Dec 2021 05:20:32 -0800 (PST) Received: from localhost.localdomain ([69.163.84.166]) by smtp.gmail.com with ESMTPSA id r6sm2762803pjg.21.2021.12.02.05.20.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Dec 2021 05:20:32 -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:20:16 -0700 Message-Id: <20211202132017.9688-9-tim.gardner@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211202132017.9688-1-tim.gardner@canonical.com> References: <20211202132017.9688-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:20: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: 1562720 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=oKp9EkRo; 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 4J4c5x5g2Kz9s1l for ; Fri, 3 Dec 2021 00:20:53 +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 1msm0z-0001uE-Rt; Thu, 02 Dec 2021 13:20:45 +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 1msm0r-0001f6-Pv for kernel-team@lists.ubuntu.com; Thu, 02 Dec 2021 13:20:37 +0000 Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.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 66D0F3F1B1 for ; Thu, 2 Dec 2021 13:20:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638451236; bh=VRwT8gojvqDbxUZr1DO1Jg9ooXCYZM6sRtWeV9yZIOY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=oKp9EkRoO9BjcD0eMUKuIewBTqkucycFAJ99THpdMh5ejrWbFX2EMCs+GwcDp4hqB JSPPgUGiFo8BU/I94ccC09S7Lf3in1LqPgXYVF5LIUtogL13bHmbWVLpZhqacgF94o vxQn93zIZ3U7Xqirm14ooTal8keiRD1eW2kcVwSym9EbGU6W7tw6DsEGAm/ahF0rip G3M+ma65532ezL1uhjQfgJ28jlwlkrBUulh5uaeSxLR83PNQqxv6vKsWGvJHE96yP8 ocDQp9ptfg7Cpq9aLPJNI7/vkjDDMXKvzHdW+KXQ/DLLZcI9DFS/tOKBtHcc+07U4F hCACyVsflN95A== Received: by mail-pf1-f200.google.com with SMTP id f206-20020a6238d7000000b004a02dd7156bso17417379pfa.5 for ; Thu, 02 Dec 2021 05:20: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=VRwT8gojvqDbxUZr1DO1Jg9ooXCYZM6sRtWeV9yZIOY=; b=NCj8iXQQAJMFnNMQ6X/t0xMTMCKHCqJQ0T1UFsqxLLY7Hr1dKUWCDvFJqONLdua3yZ IX2V0pe/HJI3PHiNEojO0EjWJMpkluZ+WcbVmrKlAhEVuI91Znr9lCKJ8FAmVoifrBoh W8vSpUP5Rkv/jZfWCWkQo2SkbaTcjugToAKvvYTTiSXlOlbZ30QMobl5rsUHaXYe4uJ2 KRHE4F3Sq6VXHrqTpvl96PrDl6Kdqos2QN0kDmK+5dR3tt9ug9IdX0xihmeg/JKM7n9J NufZUzbn/o8Kps4VvVZI0t0MMYPptO+AF5gZnbf/ZuWl56Cl3FuCevzGNxf0jd+y6Qnc 6Ocg== X-Gm-Message-State: AOAM533Fl49QEvSeBLBDBCsTlrSZ3Uu4m23BIh/WKawoe6yDrHMd6TuB g6B7sIrR0XwVqdqLqD4Ut+T/mE88LHcHIv2ddZQzXN+ljFPkiCxhkqcUWix0/cFSVwykZs3GArP HWIAqE4wQRFAeqlmpdMsYV64YQbNR5Aihi5ar/H97Uw== X-Received: by 2002:a17:902:e9c6:b0:141:c588:99b2 with SMTP id 6-20020a170902e9c600b00141c58899b2mr15222608plk.63.1638451234398; Thu, 02 Dec 2021 05:20:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJxhgm0YgSrljdwjhOme6HyA6OSGcjr0EwWVesu8YlgTsVjkp0DRh4uULoSDZs7deA18fW5M7Q== X-Received: by 2002:a17:902:e9c6:b0:141:c588:99b2 with SMTP id 6-20020a170902e9c600b00141c58899b2mr15222587plk.63.1638451234143; Thu, 02 Dec 2021 05:20:34 -0800 (PST) Received: from localhost.localdomain ([69.163.84.166]) by smtp.gmail.com with ESMTPSA id r6sm2762803pjg.21.2021.12.02.05.20.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Dec 2021 05:20:33 -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:20:17 -0700 Message-Id: <20211202132017.9688-10-tim.gardner@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211202132017.9688-1-tim.gardner@canonical.com> References: <20211202132017.9688-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; }