From patchwork Thu Mar 25 15:44:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Wiklander X-Patchwork-Id: 12164467 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2224CC433C1 for ; Thu, 25 Mar 2021 15:46:19 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BB015619A3 for ; Thu, 25 Mar 2021 15:46:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BB015619A3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: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:List-Owner; bh=ZY2+99RVVGCbC9PiLB6tKJ3GDqQb0OIiXfSfTHovqZQ=; b=nsdHh8VbaHS5142rbCQwMlXk1 pXBK0YP3aE6zXXfe7rALbz6PZyNg43zUM058p002YqRjK96v4dAu6DWCNlD5Eq9EsYijjWu4Ge9Dr jCJJq4V4FGPtg87erBgTxvug9OwBOlrpAF1U0UQYhmHqcBlL4vvejNFKwZhSyQg+gDqwYXX9mmzQ1 pp8NCYjLoR7xQqeAE+5Q/wTAhAM5dz+XSopreYJhSHkZKp9M9ismQXmibDL1MVlQB3M9CqgXSv+1B KbBon6SdmtaqtEg0KpWOdywlGB+BZv9636xmVwhppnwqmfqHkkQRKT+CGmGYZEtFsumFmvP4uFYG1 wydwSaWYQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lPSAD-001kSz-MI; Thu, 25 Mar 2021 15:44:49 +0000 Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lPSA2-001kQb-Cz for linux-arm-kernel@lists.infradead.org; Thu, 25 Mar 2021 15:44:40 +0000 Received: by mail-lf1-x12f.google.com with SMTP id o126so3261436lfa.0 for ; Thu, 25 Mar 2021 08:44:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=kv02eM8NeYnnByA8FlayEK6mh+4PxaRpmwdYdtGmEa4=; b=Rra31NRtKhL6xfXOQ6S73tmdqvH5K1e1EqVUNVIcwOwViaQOStlau4wLxjKsDMsBX/ QjHYpdH8Tm1C8J2wnjlxXSPkqA9nbDdn/RlNW2wp+E/reQ8Gng+d0Ha2c+A+6Ubo29x2 TiEvrFLMn/+tFiuC7V0nXeTPBEyo5ExYy8kpIe2IUTnRMl4RvfpevTUEbRb6j3c3dP3o xJdqgmJgdPjSuESbLtUgjV+/lY2OVvv9pMhOr2WfLa1UGiuacOEZ5OyrauLyfV/qQuRw JoxJO0JmpVbYQolECFsONwJhV4EsWJpkla/5fR2KcVY/PakdSUhmpzfPpbAOMqt/9Z3R VFZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=kv02eM8NeYnnByA8FlayEK6mh+4PxaRpmwdYdtGmEa4=; b=JF2loQ7QljC2vCgzlYu8TATv/JYg3NOPkV3wZ7Iomolzt/k8jo4XP3dsAHOmddGJ4d p5hrJ/BpKfNu37O3VDW3bp8gzhnoPFNkE/PtKivP3auDH3u1qr6VJNljx6lLjfxytzhe KjKO0v6m35ifdwfDRZ+eK9dE4LeolnkDH8fox3aGcFmUVQlb/fnBV4bLqiQ0b8fgnIqX RFfQB6cgu1cF8/eUG04eu/8V9jOr+RV8NR2EbYPo6Xck57h8huawfxYoDmzf9EYsp3Bp YWvumlbk33JD/pubV/rMz8umE9EZBe6IeO7yE3G/3tXV8L9mviUq2v8CPddkFhIyfV59 A/YQ== X-Gm-Message-State: AOAM532ViF22d7kCLpqBrPzohjtpxi2jh7mMaDOth74lsvWZJ4WF3Oh8 agCRcuoqv6Z45ONTblOm+5CkjA== X-Google-Smtp-Source: ABdhPJwUy0zuNgDLX4J8OZDlAy36S/+zA2k8VHCJcf2rekhc7vYkWdHy/GDxi1sxe4lh4+vaWy596g== X-Received: by 2002:a19:f501:: with SMTP id j1mr5641541lfb.231.1616687076286; Thu, 25 Mar 2021 08:44:36 -0700 (PDT) Received: from jade.urgonet (h-249-223.A175.priv.bahnhof.se. [98.128.249.223]) by smtp.gmail.com with ESMTPSA id m27sm770916ljc.109.2021.03.25.08.44.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Mar 2021 08:44:35 -0700 (PDT) From: Jens Wiklander To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, op-tee@lists.trustedfirmware.org Cc: Sudeep Holla , Marc Bonnici , Jerome Forissier , Jens Wiklander Subject: [PATCH 1/6] tee: add sec_world_id to struct tee_shm Date: Thu, 25 Mar 2021 16:44:21 +0100 Message-Id: <20210325154426.3520148-2-jens.wiklander@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210325154426.3520148-1-jens.wiklander@linaro.org> References: <20210325154426.3520148-1-jens.wiklander@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210325_154438_520241_8069AC13 X-CRM114-Status: GOOD ( 13.62 ) 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 Adds sec_world_id to struct tee_shm which describes a shared memory object. sec_world_id can be used by a driver to store an id assigned by secure world. Signed-off-by: Jens Wiklander --- include/linux/tee_drv.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/linux/tee_drv.h b/include/linux/tee_drv.h index cdd049a724b1..93d836fded8b 100644 --- a/include/linux/tee_drv.h +++ b/include/linux/tee_drv.h @@ -196,7 +196,11 @@ int tee_session_calc_client_uuid(uuid_t *uuid, u32 connection_method, * @num_pages: number of locked pages * @dmabuf: dmabuf used to for exporting to user space * @flags: defined by TEE_SHM_* in tee_drv.h - * @id: unique id of a shared memory object on this device + * @id: unique id of a shared memory object on this device, shared + * with user space + * @sec_world_id: + * secure world assigned id of this shared memory object, not + * used by all drivers * * This pool is only supposed to be accessed directly from the TEE * subsystem and from drivers that implements their own shm pool manager. @@ -212,6 +216,7 @@ struct tee_shm { struct dma_buf *dmabuf; u32 flags; int id; + u64 sec_world_id; }; /**