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: 499735 Delivered-To: patches@linaro.org Received: by 2002:a02:6f15:0:0:0:0:0 with SMTP id x21csp409901jab; Thu, 19 Aug 2021 04:07:07 -0700 (PDT) X-Received: by 2002:a19:c201:: with SMTP id l1mr10234775lfc.306.1629371227641; Thu, 19 Aug 2021 04:07:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629371227; cv=none; d=google.com; s=arc-20160816; b=tszZW8RDXLb7p7Fv9V2o4V2PFUdT5nAoZMssHsi/8Cbmphk57irD8t0nWbJQqUa6RW 7fPr1WoKa1uzT7iXdcpTPWJata1VDUy5XSp7MdS2gUo5ES3PfAqH8TVE+yWbJ7mJSnXO zc5zTYMVTFc8nWCtsn3TrsgxALdmnJsZlMQC71NFY8vz1UbSBFuz8qHT9GA0LWi6/ez7 nxS73wB2s/JvwpCJUEBKB2dViycwVpCExTNmnJ5dGerNNmQFSA6xRcLEkdTI51O2FQWt ejUUzJCLSC+ZVVEZs1x2sXSvZMInIZqYNxmgu3Vj+LwhRClTKC/usOkFYunERaEKJkjL Qn3g== 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=1D0gSIIM9kS1WL3TFlvMwY6p2M7SlyyajH6eqSkCAe8=; b=QbV2L7O5L5lc9V3WvwkiTL3nhdzJgijAIrvBvqrTJ9Yw0Cssa1ey4QTHZNxxfqURJP 5LiUBFB3yA8qdnGlA3+PlXZQK4RMQeFtQiU5g2suNA7el9yZXUzA0+HHxI0oVLVC7ghF qP5HkYNjQ6hjlnrQYOMqFXXJnW3a7g+teji3+Uji5B5tGXnzQlksPLVa8UeS72fnPUuc NgrIGzVrwGfFGkrVQI22y4KtwtZLn3rY3cCYCPMFzK81ZcucqI/hIwy1pv+0r5V4vIG5 zHO1ThV6dYzL50F4qG4f7lHVpwO69P303+DegkXVcV+K/SSiAdVLMpcDtoF5BGQN1XTO Lq4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nifBz83R; 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 n3sor784719lfu.106.2021.08.19.04.07.07 for (Google Transport Security); Thu, 19 Aug 2021 04:07:07 -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=nifBz83R; 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=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=K0UZTLcdIIPh9qJIs8vnjHVVLVCnxQ2At2Z6H0OacIBJ7Q8bpNMZbH79kZmPkLNqCw AaqSHAgSHNcMTtt5HmoNdeYcCjyYqUZlmmRBu+/NDwwCCZ5Sik6x5LwNiFnM7anc2YAA Fw7PK5w3Xqje3U0UFYqieGyyCHPnCm2P39RE2//Wj85qk5ieZgwL1vyCwtaWeICldn1g OHcrnUSnf1lJGcdy/gzZS7IY/qLv+WvbI+8gvogDaGCoqIx4kx4QN6vFZAJT+axIMMSn spNVGTSALKz/xcOnj+ekjTtISyk/M/ih4PJT/A/Rb2jXAiVQGABlCMV/bRo5WiHHH7kB BOUA== X-Gm-Message-State: AOAM532v6G5DqZA/ysa10pujmw8ue2+k9f7oq+J2JY58MSfv4+5wO7MI dNNWLkqhqCViitbEiR4Rh2YeVSYy 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) Return-Path: 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 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 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; }; /**