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: 12538745 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9AE73C433F5 for ; Wed, 6 Oct 2021 07:11:21 +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 6C96F60FD8 for ; Wed, 6 Oct 2021 07:11:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 6C96F60FD8 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=kx5z57hMhVZNxk 2I6V2s2ezhVAw86CffRZA9lGeI33KbRfXdwMRpGFLDdmtLVCQXI3zce8VQN/Wl8d75uR8/xN0UIds rVqth+SLR92hi5+iOoWAxPLdLomBD5EqAleJvyagSrRJLiME4pzn9xUh+yg8KVPbwWEmuOFBkDCPT b/VK2Z7cj3kWUqFNIyQjiJ7XeQZX9VMmtaHkACTWeoWkA88gmOy8XO+MytKh1SAQ2aEwN3NZGS7mb BQwYPUucOHSsLYD2ZEagCIYORyvtw1r6vcl2v+hkIg+gvHTSDEW0wDJXIyNMU84ABjRMvhGVBRPXp Us9AWAWXEZL0DqcZGjXA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mY13D-00D8Gd-K4; Wed, 06 Oct 2021 07:09:15 +0000 Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mY139-00D8F1-Cp for linux-arm-kernel@lists.infradead.org; Wed, 06 Oct 2021 07:09:12 +0000 Received: by mail-lf1-x131.google.com with SMTP id m3so6355645lfu.2 for ; Wed, 06 Oct 2021 00:09:10 -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=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=RIIPVEfMSokoVYafqdvSI95yvseUYyuxfeOeZJDfHprYmSyoH68ShCSN2itNP635ZX ykCmQlgUkQ9KH9OTVTByP/BD2TNV0xBpNVzmtkumR5Wt5CHSDroy2EomciFTaEy7ya8g i8p45UI3FOb0QOnSU3fXfVq7OIkuMS+FU+Tv3RAlZ+PeuOKo+JCyM56t72vedPysQANd l8fbSm9c8NmpzNpOuBFpMsiCHkKAMrTdM1e2xXBbCp6hWoN03n5Q8uq3kt5Q9o1AK0ir XcEFrjjGXnwJAPPwgZJpdqg09Rp30qmovYLfJGiQL4MFn4baj6o+DfffI2skZ4M17C+u MKzw== X-Gm-Message-State: AOAM532nXu8PDiZYlL9tjGQvHIrYoizLjBA89YrVd8Rx1mlr7WmD3oJv reZ2sILQVEhtvmqz8rrFO3ibVQ== 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) 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211006_000911_455779_E517A16D X-CRM114-Status: GOOD ( 13.57 ) 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; }; /**