From patchwork Tue Feb 13 14:52:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Balint Dobszay X-Patchwork-Id: 13555207 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 39C42C4829A for ; Tue, 13 Feb 2024 14:53:48 +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=1ZMDF1moQ+N+M3pKpFcCWtbbc+QQcjyQ4qYIc62LP3w=; b=ZexUgSglqcSNOh enL7rpg2hWPmE+zKm+jzX3GSvcsQG5SFSnA7RtcvrUW0sRLlDgw9BYLPEldL1M72F3hNX+IvZD2Lm 70FSD6BJJ0065ddO6uj/9h8o/qWeaVDrTClsrUG4eWzUvLT1SazMjCyL9Q+Iz/ZkOnqAKj9/nEEZQ WdaZaiVSoNzxI8+Y36UOzl01ocDSB0EPN66nw5D6JTazv79EdHgwZP4iKXQ+TI1a1fztNMCZhOOik xjCLxke06IvbalekpCa8q+0H5d2HZ+5bd53zXUPvNfHW5JGBBvb3ioyVpxfITXs/ZImnJxGM/u8Ui W/WidVI8gzCQMFqWf8vg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rZuAD-00000009apI-1LEe; Tue, 13 Feb 2024 14:53:37 +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 1rZuA8-00000009aoc-3uAa for linux-arm-kernel@lists.infradead.org; Tue, 13 Feb 2024 14:53:34 +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 5DC40DA7; Tue, 13 Feb 2024 06:54:07 -0800 (PST) Received: from mango.localdomain (TVHN20WD9G.budapest.arm.com [10.45.25.43]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 999893F7B4; Tue, 13 Feb 2024 06:53:24 -0800 (PST) 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, gyorgy.szing@arm.com Subject: [PATCH 0/3] TEE driver for Trusted Services Date: Tue, 13 Feb 2024 15:52:36 +0100 Message-Id: <20240213145239.379875-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-20240213_065333_039659_04DDACDA X-CRM114-Status: GOOD ( 11.77 ) 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: , 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: 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/ Balint Dobszay (3): tee: optee: Move pool_op helper functions tee: tstee: Add Trusted Services TEE driver Documentation: tee: Add TS-TEE driver Documentation/tee/index.rst | 1 + Documentation/tee/ts-tee.rst | 70 +++++ drivers/tee/Kconfig | 1 + drivers/tee/Makefile | 1 + drivers/tee/optee/core.c | 64 ---- drivers/tee/optee/ffa_abi.c | 6 +- drivers/tee/optee/optee_private.h | 12 - drivers/tee/optee/smc_abi.c | 10 +- drivers/tee/tee_shm.c | 65 ++++ drivers/tee/tstee/Kconfig | 11 + drivers/tee/tstee/Makefile | 3 + drivers/tee/tstee/core.c | 501 ++++++++++++++++++++++++++++++ drivers/tee/tstee/tstee_private.h | 92 ++++++ include/linux/tee_drv.h | 11 + include/uapi/linux/tee.h | 1 + 15 files changed, 765 insertions(+), 84 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