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: 408832 Delivered-To: patches@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp647921jai; Thu, 25 Mar 2021 08:44:38 -0700 (PDT) X-Received: by 2002:a19:b81:: with SMTP id 123mr5416606lfl.553.1616687078095; Thu, 25 Mar 2021 08:44:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616687078; cv=none; d=google.com; s=arc-20160816; b=SWcT0MMLi8lqzs8CSltoal8zCUmdkcQl/VflO195svM5MLjWdbGR9AGlvDaC7IiyVo k9UoVqxQ9TyDKUjGgKlV0zPuwSB7yP9zoixA3LfY/5Q/AsC0bEAv+lP+4OnlikR/tWKJ hwlbwoVCNs1GowGG93fA2hsTV4Q/8nB84fLiTPOQ/8f/jpPrln5286jiwUW9IyczGkTL 76OVDMolWIApAkbU0vrGUtmGBDXkjJDmllwUhI0XHeh4rAFkYQQHT9x5db3sJ60qxPwl c22N5t4qAIMRlWOi17Kqo9nshdaXOK0WzA8kNCI3Ewd/q/7yX8QWiE0AM2qauvrl8sa7 wGHA== 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=kv02eM8NeYnnByA8FlayEK6mh+4PxaRpmwdYdtGmEa4=; b=uHZssy99EkTbJxPu3mTdbKTclWV8NBHn6i7XsysPb8IzYd0JaZ1pYWfx/Y8DO8XdDr 6e3ngaVuLoN9YdaCE42ZEI4EVp+OoGyago2eo1h0mDNr7RGzPurzwLJiv0P81qW11BC9 B8v6hPoyVia50n/2XEOlhQ4fjqekyWkpO+DgJwW50ROiXpPoJVLuQDwICCprurZEsjtF ovUAuquxZscjciAF7rqdTimH2iowV13W423O5jeKzc/e15oYJ0nOtEDE8X/FUJ5vqVrC qLZ1d9cYw9EXVre29jE2R7rx/JZpdreY5hycP7Qs1xuXF8puFFIaichPtZJEfYqBvzCM ch0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Rra31NRt; 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 t27sor1483010lfp.118.2021.03.25.08.44.37 for (Google Transport Security); Thu, 25 Mar 2021 08:44:38 -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=Rra31NRt; 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=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=tWbeoH+FdICLlTegYxpcISwGoXlLDwK6sCZ1oTuH2msvyVHBUOcm9r8LPrVkgOD/aB lsrxRtZLOmJlynrfODE3QyPULVrCrN+oeIkGHz5WewX9l93F3loNE0tH/DSyA4V4RU0M BdgNWNfJLg/L83PfrlOXiSeSNDN1pD/90e9y2aOZDPQHsEIeqTjo8fsSSsSdmwhqv6BE Et3thGSmc516O8vhuPx5knHBhe5t7Kto3BvnCnzl9hJJw+PFiPEAxYIb5dniXSHG+OTM ItX/pIHSkK8HIf9FEJRrMW6AsJrA+2Ipq44PKtTuZPWkaZTjmS7aoZkBuC01u9ZimXqe odLQ== X-Gm-Message-State: AOAM532vZQ7D7PhO5aXN5gvtIYHzoO2RZi81kNFnftjA754Sapgk3G6f hiN9cG7Frtp1nPdW/Gltuwpr0BQx 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) Return-Path: 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 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(-) -- 2.25.1 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; }; /**