Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp470292pxb; Thu, 19 Aug 2021 04:08:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwBIdruSKmL3pTBduU6t9mQk02fZOPMy9wJo1hcORWhjBdXXarcv9MmbcEee6ji4YMDxmHs X-Received: by 2002:a02:664e:: with SMTP id l14mr12475671jaf.56.1629371288122; Thu, 19 Aug 2021 04:08:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629371288; cv=none; d=google.com; s=arc-20160816; b=nL7aqbTaGkDL7VVBnwEIuFrs7SaCMCzf9JPggafgtJhMgMcYC/y5P2hB1VGqeUJ8I6 sx82gh+KSq+SCG+bHqsbs2eqlkKz4yEXYOMJfqbzlHwCONOAmx9j3BhvPikDIUc8U+vL iyOYrvimUsI348R2BFlUwDnV8B4d4QPnCM1nquszoUa4X3CtNueFVBd19EbxtiUMzVJZ J6tQLAJj1AfoGSDwcS3wxaP9ozBNh3hZlXZmuiqCBNl+9uQ2ZteJY/E99VKGJAuDd3as XCJ3EtE8GpmHi2vWyfXBwWXALRsOVj1JcQChkgEu4DrdThlN1XdGGBIN9cU91o0Rao+S pyRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=1D0gSIIM9kS1WL3TFlvMwY6p2M7SlyyajH6eqSkCAe8=; b=BQ3zkYpP7hBQhX6c2dho16iyKmeTEHb/OxvNvy3V3OA4Pts9UzepZFYg4z/JQ9lWTt VVuBrZ4HqQZBVx+jhx117NRjXgfj28ZCHJIw+dmAfWJl9qrQosSodnj58cvYAMGA7f+a 2fy5rIbfFeyREFZa8HQu7VrEbjCscGjlrIBDOJBAl+RnD3Qv0E2d06fNIU3Rc4Kh5mS7 H7E0oUXRMSe8JFz4v9yjdMbGFJv4Zu+TPdKt8jdCAgIvgv+iONgUqkITKI/lkvbSEQJr wzDXOOURzy/BVN+zxSHrsS3UFhMrrGXfAXadUBt36+c3Vi97dw7/PD7ROlYb2KI7pmFt fbPA== 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 linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b16si3579781ilf.63.2021.08.19.04.07.57; Thu, 19 Aug 2021 04:08:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nifBz83R; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238457AbhHSLHq (ORCPT + 99 others); Thu, 19 Aug 2021 07:07:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238283AbhHSLHp (ORCPT ); Thu, 19 Aug 2021 07:07:45 -0400 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 08A5CC061575 for ; Thu, 19 Aug 2021 04:07:09 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id y34so12040230lfa.8 for ; Thu, 19 Aug 2021 04:07:08 -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=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=FS0eRjSYb7MXEefR0ePE9TCNfUF+LklcOnJZURjAPeZuPgJgUJ/CnHq2H8J/+L1p6U ZstyT7QREKPTyL30WBKyWjlyhaXSGWv+RtF5lX8rmgKz0/kuz43LuW2sBUkgQEzzRqtb MHaGdt4k3+wPIVt64++EfBPXKXUe9Er3rJDUio4WoWLtV0vpicSS4JHmHK77Ds0AWuCN 1Td8D7zeizBnrV3QKU9hsLKqgbQXRc0ZZ3/9hYuHgIGW/cnjBRvTjjjgpGM4ilfKi+PK fLrMaxMnJ0Xh774PlqZj91SqsftLl6uCG3sG9kfcahyopviU03V/P61BOYMUUq/dPdrm Bv1Q== X-Gm-Message-State: AOAM53137ppfNJVA62/YbMIfesDWoYV71+IxJ29a25YXr3ZLOj/TI527 Y01zpix+ZvFfjd7csi1ly+Z5ksvRUxhRdQ== X-Received: by 2002:a19:c7d4:: with SMTP id x203mr10117577lff.575.1629371227273; Thu, 19 Aug 2021 04:07:07 -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 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 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 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; }; /** -- 2.31.1