From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1CB37C54E58 for ; Mon, 25 Mar 2024 15:12:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=jkmPHFEeldICJRTI0i3o343EGz1oEdpgtT7n52qsj8o=; b=ac2u2D+2PFlfNb 4jI1mNhoYmztjDs/UAGGiujRt3r43SCiPSVq//HN7rln+BgeDYOO3OWYSY45acVXhNddVThkUrb77 rCEscDo5z8FLynbFJWcagK3nIRTo3iBgv7JdrUX6+wnoLTwrWbu2WJ3OscI0nboHdOluJbjqDOMba uV50YXPXCu1cKEZ/w38fR63vtpHS02cjnD6syXXpKNjKmyWWFq0z+gbsdvvz0nSAtTFAyN5gp+n7g kTjhyMhxHP2NnG3Wrjw56MTA2seyOE8BXVoZsLvwFhx7OtVcN5la4apW0caQFxHvZkh3MoTj61cWG j345ugME7qtmK03Fr/rw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rolzB-00000000PoK-2mwX; Mon, 25 Mar 2024 15:11:41 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rolz8-00000000PlP-092p for linux-arm-kernel@lists.infradead.org; Mon, 25 Mar 2024 15:11:39 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 619CF2F4; Mon, 25 Mar 2024 08:12:07 -0700 (PDT) Received: from mango.localdomain (unknown [10.57.15.164]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 961A33F64C; Mon, 25 Mar 2024 08:11:31 -0700 (PDT) From: Balint Dobszay To: op-tee@lists.trustedfirmware.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: jens.wiklander@linaro.org, sumit.garg@linaro.org, corbet@lwn.net, balint.dobszay@arm.com, sudeep.holla@arm.com, rdunlap@infradead.org, krzk@kernel.org, gyorgy.szing@arm.com Subject: [PATCH v4 0/5] TEE driver for Trusted Services Date: Mon, 25 Mar 2024 16:11:00 +0100 Message-Id: <20240325151105.135667-1-balint.dobszay@arm.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240325_081138_218812_AB7AA2B3 X-CRM114-Status: GOOD ( 15.35 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This series introduces a TEE driver for Trusted Services [1]. Trusted Services is a TrustedFirmware.org project that provides a framework for developing and deploying device Root of Trust services in FF-A [2] Secure Partitions. The project hosts the reference implementation of Arm Platform Security Architecture [3] for Arm A-profile devices. The FF-A Secure Partitions are accessible through the FF-A driver in Linux. However, the FF-A driver doesn't have a user space interface so user space clients currently cannot access Trusted Services. The goal of this TEE driver is to bridge this gap and make Trusted Services functionality accessible from user space. Changelog: v3[7] -> v4: - Remove unnecessary callbacks from tstee_ops - Add maintainers entry for the new driver v2[6] -> v3: - Add patch "tee: Refactor TEE subsystem header files" from Sumit - Remove unnecessary includes from core.c - Remove the mutex from "struct ts_context_data" since the same mechanism could be implemented by reusing the XArray's internal lock - Rename tee_shm_pool_op_*_helper functions as suggested by Sumit - Replace pr_* with dev_* as previously suggested by Krzysztof v1[5] -> v2: - Refactor session handling to use XArray instead of IDR and linked list (the linked list was redundant as pointed out by Jens, and IDR is now deprecated in favor of XArray) - Refactor tstee_probe() to not call tee_device_unregister() before calling tee_device_register() - Address comments from Krzysztof and Jens - Address documentation comments from Randy - Use module_ffa_driver() macro instead of separate module init / exit functions - Reformat max line length 100 -> 80 RFC[4] -> v1: - Add patch for moving pool_op helper functions to the TEE subsystem, as suggested by Jens - Address comments from Sumit, add patch for documentation [1] https://www.trustedfirmware.org/projects/trusted-services/ [2] https://developer.arm.com/documentation/den0077/ [3] https://www.arm.com/architecture/security-features/platform-security [4] https://lore.kernel.org/linux-arm-kernel/20230927152145.111777-1-balint.dobszay@arm.com/ [5] https://lore.kernel.org/lkml/20240213145239.379875-1-balint.dobszay@arm.com/ [6] https://lore.kernel.org/lkml/20240223095133.109046-1-balint.dobszay@arm.com/ [7] https://lore.kernel.org/lkml/20240305101745.213933-1-balint.dobszay@arm.com/ Balint Dobszay (4): tee: optee: Move pool_op helper functions tee: tstee: Add Trusted Services TEE driver Documentation: tee: Add TS-TEE driver MAINTAINERS: tee: tstee: Add entry Sumit Garg (1): tee: Refactor TEE subsystem header files Documentation/tee/index.rst | 1 + Documentation/tee/ts-tee.rst | 71 ++++ MAINTAINERS | 10 + drivers/tee/Kconfig | 1 + drivers/tee/Makefile | 1 + drivers/tee/amdtee/amdtee_private.h | 2 +- drivers/tee/amdtee/call.c | 2 +- drivers/tee/amdtee/core.c | 3 +- drivers/tee/amdtee/shm_pool.c | 2 +- drivers/tee/optee/call.c | 2 +- drivers/tee/optee/core.c | 66 +--- drivers/tee/optee/device.c | 2 +- drivers/tee/optee/ffa_abi.c | 8 +- drivers/tee/optee/notif.c | 2 +- drivers/tee/optee/optee_private.h | 14 +- drivers/tee/optee/rpc.c | 2 +- drivers/tee/optee/smc_abi.c | 11 +- drivers/tee/tee_core.c | 2 +- drivers/tee/tee_private.h | 35 -- drivers/tee/tee_shm.c | 66 +++- drivers/tee/tee_shm_pool.c | 2 +- drivers/tee/tstee/Kconfig | 11 + drivers/tee/tstee/Makefile | 3 + drivers/tee/tstee/core.c | 480 ++++++++++++++++++++++++++++ drivers/tee/tstee/tstee_private.h | 92 ++++++ include/linux/tee_core.h | 306 ++++++++++++++++++ include/linux/tee_drv.h | 285 ++--------------- include/uapi/linux/tee.h | 1 + 28 files changed, 1094 insertions(+), 389 deletions(-) create mode 100644 Documentation/tee/ts-tee.rst create mode 100644 drivers/tee/tstee/Kconfig create mode 100644 drivers/tee/tstee/Makefile create mode 100644 drivers/tee/tstee/core.c create mode 100644 drivers/tee/tstee/tstee_private.h create mode 100644 include/linux/tee_core.h -- 2.34.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel