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: 12466653 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.1 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 0C384C432BE for ; Tue, 31 Aug 2021 07:29:10 +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 C7E9360200 for ; Tue, 31 Aug 2021 07:29:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C7E9360200 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=orOYHQUEIxWph7CyjTMUjMmkCvqjwyFQdZB224Ahtww=; b=H9GX1AM5ypAB3p vH3pjVeJRTenmrGmAlHw5FOSZUp9Z3htM6v0jUfMtzpPMM/2Nh50qZ68hECg23MR+aYabaIurYZxH oX/y+SnI8Quq5/x2d4uBjb5LuuD/vxLevYB70M4P0yrB6cFHGO+dhJ++VdClA757nHiCogKNVk9yY TpcJjdyKmU3RdvBcN97/RzjZgw4Xgv68/eN3rHEurJeS08nbTdLcgGAOVdNhUXu3Ga+n7VlemOBPZ gqqZerRq9kSnTmBeMKmXgDHvCus/HbVjRK2+TrnXjGo2zWjE3AH9r8kgK47w+/OxLtu4hlu+yJd2q 8kn1+vLkJWQ4UyUCc+bg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mKyAm-001dQY-HX; Tue, 31 Aug 2021 07:27:09 +0000 Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mKy8r-001cU1-BL for linux-arm-kernel@lists.infradead.org; Tue, 31 Aug 2021 07:25:13 +0000 Received: by mail-lf1-x136.google.com with SMTP id l10so2312094lfg.4 for ; Tue, 31 Aug 2021 00:25:07 -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=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=IhZANa3643udbR1EAaD7g5Fqlxb0k5ADJJRLd3xhJETCHHEvB9ONgYXEu08MTOe+8k FurYRyCUvVzTzXfGti8B4/hFVssvZi58fynszGSdbdOilOphaI5K5xYORPLRKjBuojqq 5A7DCl3D/fDoH/QG+mJAuFkA9T/9pYtNr08nSMKzQ9gzy9VHLnTI6TMXm5Z+HkKK0Via yX3msgInGihbfY90DZzVtdh4r4zd054eifgu2kQU7HKIIvmAg95p8YfWnQvMPHqtlqGZ LyHSstnIAvBffER2genQKM/JqOeKCZRDijpH/kU8Pa0HDZbHhvg9W61G4wMiVbt6DHl6 vW8A== X-Gm-Message-State: AOAM532tOdtSbAtFQV+npIIZfzfQjQWy1s/GOvHYvILuHiLZT4hs4xFs a8Twe3MdXcSU48oXK3XYYlCHHg== 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) 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210831_002509_498831_7F74DBFB X-CRM114-Status: GOOD ( 13.64 ) 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 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; }; /**