From patchwork Tue Aug 31 07:24:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Wiklander X-Patchwork-Id: 504647 Delivered-To: patches@linaro.org Received: by 2002:a02:8629:0:0:0:0:0 with SMTP id e38csp2529903jai; Tue, 31 Aug 2021 00:25:06 -0700 (PDT) X-Received: by 2002:a05:651c:247:: with SMTP id x7mr23983957ljn.151.1630394706794; Tue, 31 Aug 2021 00:25:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630394706; cv=none; d=google.com; s=arc-20160816; b=GaDS6UWQiXLY/3cnY1pbsbyISXGQFq0puECPaCGSftFOVcvpaJtBqbb0OKb+DdTl2/ z3IdhuZ9fWZ++bjYcohr++Zf+TjgMjGO8E0a9BZdIVVDOavUpV3HCXqRNlQeTehg10W+ l3oM/mgrnETsf+tAvSc3seOavSmGdTv4J57fT6V90Iq+Oti2AKVB7b8TW8Fz39ww4duF t7PpjWU/mZdtzUVV2zHNZ3j8g6WzgwCGiCDRMMHWaDyJtlWIzDWRL4/Ya4dhOOwBydKG A1dHplJK+VeapdGznwCnPDorbhakecjb2Y0jiVw8SvFGZEVfnBsqMEYVEbZFk5eCuqcb dKOg== 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=gerz0M8ff/4MfCf/xg8MndWY20ZJt76uhydOQrXsfwssQNhgcGgRAKLJjBGlhl/9Xi TMQVIVbH9bsn/ovFtBI8dY2ze+16LSg0L9FXWhs0QINRl1J6riHIFVS6vtMXqzcGb60e H+Bgf6IBPdcgFo/i40U8ZxTYRsH6ere+hQOxSIfvuJHu8pEIBJp0zrUQCT2krNNFu/Et VUlNQJYk+nl8/4g+D/y7P6uzV6dPfWpRzhFxeSGMeFZFkHwgDeKJuNqOZ191yLSZcEiz 5zUn/qpoTZjXBrg68ybLZRNl1Zk4c7XGla+C0139N9x9TENMJ02TFQ3Q1VYXNsYNNKFI 30Og== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iNyRlbcM; 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 d9sor3825433lft.58.2021.08.31.00.25.06 for (Google Transport Security); Tue, 31 Aug 2021 00:25:06 -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=iNyRlbcM; 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=iNyRlbcMO4LknPkqP5iFDBV09Yqg0XtrnmdY7PN/0/E/2JDFxzTOEKDH92y7rH6B0L NigfgnbJciNP4Ku08MkJxAGZSHjaTp3zQLl03T1Js3UKctvjXxfkvtZbjRUUxxmwVuVY UJ9jnQFHtkBcO/HIPC/WE9xkKnLs1iH4WCchfenEEyFRsqbmSVIg7THPa3fDurPG/KSY EkGdv1DuxTpdfFWi1NTF4A/XR/EcniBHKcQgdhOW9LpGjlWfwserbx4WffQWBzS+6ESR T4HepE0Lr/FgW95zNICdnisx0RV3+uzytkvTl4caSgVFVdIwCUIZXVi5q+hlzjSpXdAR lDCA== 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=NvXatvGat/zwzJqSmrQCEyhrxQWhLfa0q1L0IoYWuTg=; b=tPvpLc6wIhv3Sh8kSpZ/8qtYAkcH6eHXJpLhVtZ6qtvChLNtO69VTfbKNVhL0qJHt/ GK9WPy2Op1kDZtjoasCgx6TGrKK5E782ZVdW2rbesbnVmuip01xyKaXYf12oz8OQjDoB 04RV7TZrr3RDT/xgGO3tiiSKqEnhdvUsUCwB/2L4NePy254yF80WiDNYs4vKzswC/yJG GiqbyoIvg73UcKgKsu+upXswpOzs+lEi68NB/AS75Mhr5M9gLnoMQ9T9yHIQQeCQAcLc rshMu/2aeRzojFywFeOL+YzcxV5dhAvoVI/ASaEURaJxPk88n2kw5XkwtAaELwoH/ekZ o1xQ== X-Gm-Message-State: AOAM531HQH1UXdvKZn+J0J2xb3tqg6BtCkb1VYCIjHEfNvuXKhV4oILV sSIcPCmlk6QhKNMZAxNITDhI866+ X-Google-Smtp-Source: ABdhPJyqJhMtxAM+nqvSzFBxNdo5C3ywqecCyMvb+BiPoFVm9kMFZFdZhDqHVBqHGTFY0+qBKBkYXg== X-Received: by 2002:a05:6512:128b:: with SMTP id u11mr1739974lfs.387.1630394706438; Tue, 31 Aug 2021 00:25:06 -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 c10sm1642569lfv.246.2021.08.31.00.25.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Aug 2021 00:25:06 -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 v5 1/5] tee: add sec_world_id to struct tee_shm Date: Tue, 31 Aug 2021 09:24:08 +0200 Message-Id: <20210831072412.887565-2-jens.wiklander@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210831072412.887565-1-jens.wiklander@linaro.org> References: <20210831072412.887565-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; }; /**