From patchwork Thu Aug 19 11:06:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Wiklander X-Patchwork-Id: 12446847 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.5 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 E9EA4C432BE for ; Thu, 19 Aug 2021 11:09:45 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id B6302610CF for ; Thu, 19 Aug 2021 11:09:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org B6302610CF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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: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=UYE+WdJvw3v+eOv7p9pU0zEon9AiCotf9wdfSq56kwM=; b=K4jKghOAblfhof RYSs9mW4QZaT5VDSJr6OErh6OJ6AeRfrle4nFSdVVZf4uY6NZjhkGesycYV9UEM57/iD/pbnq1JvQ aiZohLFpxCAuQLE3ljthtQkKKpjr8wb3Bq5nqoMn3klx3VWyU+mqOAjJTsLDrsiK7rJPmoAxEhvHd 0Mv8jgz6MQejZtkGuKqbuZk/ckGHt/tXdE6yBOtY1uPbw+8JZ4xysHftjhj7RQ62tQytSj40MkCEU 6f2+IH19gIibnECURBN0xrQ5YE6WRG+Y+TVJzf+jS1dvOmq2BrwJ7RzxOj/2yqaPyez8E8c4zF/ed pVvLW/RhbzvJjukrl3Pg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mGftH-0085JJ-Pa; Thu, 19 Aug 2021 11:07:20 +0000 Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mGft7-0085FO-Ch for linux-arm-kernel@lists.infradead.org; Thu, 19 Aug 2021 11:07:13 +0000 Received: by mail-lf1-x12c.google.com with SMTP id x27so12068026lfu.5 for ; Thu, 19 Aug 2021 04:07:08 -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=1D0gSIIM9kS1WL3TFlvMwY6p2M7SlyyajH6eqSkCAe8=; b=nifBz83RuOk2yKZ7DlxSGk+2aMfRYklkUTCwiN6zI14J/Rdmrb4wCdDsMroxraY8X4 iT2pqccqJc8J762yRWEVn9kFJIhp3zeTw1kIQyujU/Hhyw90q0RJnCl2uSY/TNyrFOTx k9Zz5nu2l7qT7rL0YdEq0Kc0BNjttgZmT+vhVEkZpnWh5zE0reGrX/2tP0lma9hYqdBE tLeMpgaVQ98KMsnGYOqRRqtt//bMgkQ58GtXyp4boRr6Bp8Db80AgX2iWhgj45fZtail N9/m4rCmZg8D6ELcAeNNJmg4U9C30j3zREhmpIEp/zKrlBRs/ntZi3tU659h6Zt6CQHj SrOQ== 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=1D0gSIIM9kS1WL3TFlvMwY6p2M7SlyyajH6eqSkCAe8=; b=XGiQVuyLyP7XYH5FV45z497AORXWqW51OhEQTXjAeR8O1WGu4hs+iiwLTvG7yEqygv Q0eF2n3sCSLs2bc1lycieCkQK8nYx+J06e/vmZ24kXg4nnWkVMl+0UFUM7QxviLRUdnj vLR0FuHeTkDxYTJRgpu84wt91Q06+6NF24HC5HiPlYw3JxdoxAatcIQdkFdfeXhnPGiP pxSQfGFdhbg/gnFIzlO+UnUHCsGVJBV54/evh0HrugEXWQDFYvVRW4kZCROCwP0bPtiv nSSbGb2XRwxSNiyru6TFR0ZR9dtlx0+f+C8Fw8jlJwXulRN2MuhOV1UpKBzy4GUftslq Yhpg== X-Gm-Message-State: AOAM531gR+/b7kGECpzMRMTgxGjy19VLswFJ/uVQNlqHyX61QamJyzsy VtQvnwYgo2JPci9oMQL+zh1NaA== X-Google-Smtp-Source: ABdhPJwiXwK8BC5+5TfFKE8QPT4HlXOoSoQIwl3Kk/Umy9K8k2NaBTKuITEcDBaTImsVb4b/YkC12w== X-Received: by 2002:a19:c7d4:: with SMTP id x203mr10117577lff.575.1629371227273; Thu, 19 Aug 2021 04:07:07 -0700 (PDT) Received: from jade.urgonet (h-94-254-48-165.A175.priv.bahnhof.se. [94.254.48.165]) by smtp.gmail.com with ESMTPSA id l19sm261131ljj.36.2021.08.19.04.07.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Aug 2021 04:07:07 -0700 (PDT) From: Jens Wiklander To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, op-tee@lists.trustedfirmware.org Cc: Sumit Garg , Sudeep Holla , Marc Bonnici , Jerome Forissier , sughosh.ganu@linaro.org, Jens Wiklander Subject: [PATCH v4 1/5] tee: add sec_world_id to struct tee_shm Date: Thu, 19 Aug 2021 13:06:51 +0200 Message-Id: <20210819110655.739318-2-jens.wiklander@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210819110655.739318-1-jens.wiklander@linaro.org> References: <20210819110655.739318-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-20210819_040709_505299_0AB803A3 X-CRM114-Status: GOOD ( 13.79 ) 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. Reviewed-by: Sumit Garg 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 54269e47ac9a..1a29f0e66e13 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; }; /**