From patchwork Wed Oct 6 07:08:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Wiklander X-Patchwork-Id: 515293 Delivered-To: patches@linaro.org Received: by 2002:ac0:890a:0:0:0:0:0 with SMTP id 10csp229466imy; Wed, 6 Oct 2021 00:09:09 -0700 (PDT) X-Received: by 2002:ac2:5f92:: with SMTP id r18mr7822465lfe.445.1633504149427; Wed, 06 Oct 2021 00:09:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633504149; cv=none; d=google.com; s=arc-20160816; b=byZYiCMPOA1l8/3oZimexG9zCekb2ve71j5Kw/Qwk7IXjrX1ws/yghFS11rlyqP1u0 T3txPf3KqrfpBrqec4UxZZSqa6PbQgA9iTTxXpmYFsPU/MO+mYkkiQ+Sn4frmrwgn+F/ I5BFWQBjpYYaZWKf+IafTevDTMeS1QZXaXjdvnwEo/8T2yrjuu91wBvvidLXWaxzots/ waWXoDnv/UXENp65D3V65P3BVipuah+WcvMlaIlhVKXOrKl75e7FRuLekIMDXZt0sE6W aqoXEKjLURJUxBkmGXMDnrZP2IvcadCbFZudsFtzx+FeT3LLaZr04KMRKOigyU03jCrz 36YQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=NvXatvGat/zwzJqSmrQCEyhrxQWhLfa0q1L0IoYWuTg=; b=zJGmui6fGy8ND4O3MZIZtwERL+zuzs4T5gFBjhdnlhNoYS9cbmWZL2ClYqsHU36xRk p90QpnaN+vZOE+pi6vhnmdQHLwFCouqthgp/HNCTjGcHnQPpBR3USqLpXXU+5Y8QLAhq g4f0KTarWH6YblUX9f0yxpIrOaSQtjdndDXSO60CqazGmQJsBhlBi+pMjOpxg/pUKgva IVVQcouQL7xptFfxFI/t9T6pj3sh2lIUEJnuUhnLhUZIH4DYEs3WtsWDmCa42O1MV8e7 Xk1FANq9yVE8O6wbxNdBavlCpcygVPqnuhI0N7PuJlpAFJ4yuMno1sGvJa7CwiwOycai p4AQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OUMXFkVR; spf=pass (google.com: domain of jens.wiklander@linaro.org designates 209.85.220.41 as permitted sender) smtp.mailfrom=jens.wiklander@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id c18sor5283154lfb.185.2021.10.06.00.09.09 for (Google Transport Security); Wed, 06 Oct 2021 00:09:09 -0700 (PDT) Received-SPF: pass (google.com: domain of jens.wiklander@linaro.org designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OUMXFkVR; spf=pass (google.com: domain of jens.wiklander@linaro.org designates 209.85.220.41 as permitted sender) smtp.mailfrom=jens.wiklander@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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=NvXatvGat/zwzJqSmrQCEyhrxQWhLfa0q1L0IoYWuTg=; b=OUMXFkVRlHjmPfLG01X7bZWCgFjToKccbZtsyf9eZ8/OEK+CvHpiA5aPvlz2z9mRSD +ZKfg2U/a2An2ygd2VpvvsmPX7uCKkAC+Hxc41yuQTj+uePVLiOU+haODZ/ApYHH/8f2 3NtIrioLve9QELz1V3TrL3NotEHS9iQA8y4r+cJqKg9I7OGLndz+S6fBgkpjg+gxWis/ iblOzSOrQ8Yhakjl26lrMc4NPO5mWRL6Lu+Ut/JZLmsyhsPdF2RGgMFETpmAdABz0j4D Hk3mvPCK7lhVyyi3R3FFdaF92xiAeEqYtq86fH+kS+L6FtG3jJD0zGAJattBFE05YAj5 RNJQ== 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=NvXatvGat/zwzJqSmrQCEyhrxQWhLfa0q1L0IoYWuTg=; b=hS8y+kjrPlzCKNj3EiiT+/W2tlJubC+G/yHlJNUIxBPS+rq6rzSNHtsvmZP/c91YoE 5js8jsM5SVLg9ElB0ZsMposmk7SAoId9Zr01RP8kMEL90DHtmyGq+yq35d2b4nj0MWDr 7QpsLMtaCrgMCP09TQ63lE+jJaFzs3bS7T2H2JK6f2i/ztwrvQ+3MyIeusj2pDs1DdpK qQ7iS3ZcIZsDAZSZOuod9RAp7swLzUOsfmdWHZwYwZ2WY5qNxZlH6SC9HEjOm84kDqAz AvC5xzs8muH6iyGSIdE6/jpri8lNjN4dBIxB6tl7kh36pEoOdQjt9clR31Hk+EjJ4dj+ KWgQ== X-Gm-Message-State: AOAM532kO1vHN4Zf+IHg52Hz+M1BRUpAUztldp31Je3s8S+52Ew+xKvS vK1GxvhqLClmIHHJe6fTtQRng8Cv X-Google-Smtp-Source: ABdhPJwiWckAjDP0oEVOp7O6I+2xdWl6g3KHBDRUZLJcWAjzuNr4/EViv0KcghFJmprudeewbUSrZg== X-Received: by 2002:a05:6512:108f:: with SMTP id j15mr7531991lfg.337.1633504149074; Wed, 06 Oct 2021 00:09:09 -0700 (PDT) Return-Path: Received: from jade.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id u15sm2381032lfl.20.2021.10.06.00.09.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Oct 2021 00:09:08 -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 v6 1/5] tee: add sec_world_id to struct tee_shm Date: Wed, 6 Oct 2021 09:08:58 +0200 Message-Id: <20211006070902.2531311-2-jens.wiklander@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211006070902.2531311-1-jens.wiklander@linaro.org> References: <20211006070902.2531311-1-jens.wiklander@linaro.org> MIME-Version: 1.0 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(-) -- 2.31.1 diff --git a/include/linux/tee_drv.h b/include/linux/tee_drv.h index 3ebfea0781f1..a1f03461369b 100644 --- a/include/linux/tee_drv.h +++ b/include/linux/tee_drv.h @@ -197,7 +197,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. @@ -213,6 +217,7 @@ struct tee_shm { struct dma_buf *dmabuf; u32 flags; int id; + u64 sec_world_id; }; /**