From patchwork Thu May 27 08:14:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Wiklander X-Patchwork-Id: 448837 Delivered-To: patches@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp285417jac; Thu, 27 May 2021 01:14:19 -0700 (PDT) X-Received: by 2002:a05:6512:2385:: with SMTP id c5mr1544518lfv.515.1622103259239; Thu, 27 May 2021 01:14:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622103259; cv=none; d=google.com; s=arc-20160816; b=ITyT+NCBAzsB4Tmww9DO8UIn0TaHnLOdngcWCOu1Msj8KXC4NEA5mkqMhpmWZx+Wwc gDqE7Qjlb0j6alssK8D9a4/dnAJQ+JWjQrhtHVuHAI3WBFwgvcew/Hxcb5Ad52/2vpYi jw54j3DxM7Xrt3MI2jrTD8cv6jBAdNllNgVHZ/Yc0MFmBsXPswMY3pTd+FntzcMOlEmd Grw9guk4VAWc9jbD6FawHwQQjAkNnkgfmqv2cMnBrGcVmsZ9xK1wKVEeaV0xxbLMkzEW KCov2kT7pT2goiJubZYbbkm+DMn03dXgTOtzxcJ6y4Ep9OAK3lv4NNGP2NlKjkPAO4iA UzYg== 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=ge755jFjD/pTxRhjKSdzjdOhplbUtYgCCIgYEHy+118=; b=oFFMfJU65uSswmQhBiVfBK/lsqT7S9TOgX1nRZdvD96y6OXvpfaIROeGOn5Pa87FzH guSPUr43d+N7cPuJ19BKejKTtmIasz9gIrXeT4rdpFczT2BWJfa+u8VoXYC55jtHxlTg 3SNKqCGlhX8cZSIQuUqP1cObVncz7nGNpyFO+AuzDbHwqOY0gBJ0yXgtXBpRQCDKsGUt nIM2fnOs5LXhydj86wIwGLImq3G2BN812LV/ty3bR8oB6pTk+yh4pU/tYH3O5HzaZxyz pK7sHSYjnLeMnHRklflBKEqSJX29M5TAlVl1iRFiye8w5uW3wW8m4f4gcAuO98DbLcn5 fYXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="hdKo5l4/"; 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 a8sor694469ljq.73.2021.05.27.01.14.19 for (Google Transport Security); Thu, 27 May 2021 01:14:19 -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="hdKo5l4/"; 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=ge755jFjD/pTxRhjKSdzjdOhplbUtYgCCIgYEHy+118=; b=hdKo5l4/GeaQDDS4E7RaP9HhNtUptVMkDBkQHZKUlhEo22w5u9aO6rcT11lLKbYKia mdAl9U/SjJHtj5iKIapgbDE9iywBcjs4xxnwhyA6qvZuL86X8bkUThOjwiES4BI+H1NN 5vaP2UtDTp/LVnrc9RnmsEhoUzFxftOlkj06xbRhyEML5eD4PfLFq26CvZ5eTcf2WHLN vymMmI/jYTi1HmOa9PF8w5gG66xO1pckPMZFAst0dN9cZTa63jODQPFtnFv27m53HqyK BKEfJdq014K9QoqTpvrVPehpT+3LrHY2M2RK1b4ChNQQGElmzN/7nQb5pYTkYM+BzVF4 r7NA== 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=ge755jFjD/pTxRhjKSdzjdOhplbUtYgCCIgYEHy+118=; b=cD5a9xsUa1jesZxMxR7j3XfCnlkoqUG7Nbg6/hOSguy9eDhdw6XkMb6uFkglz/N8t9 tg3zcOhVH30wejdVvyyAaaXwluJop442W3JwrnGbE7gvzylZm/c413dbXiPGH8izRrrU e1TtlzgFpvbgtMwo+jCXHbJLBsh+Rm2hoTmKUded3dn0Y0LB34aftjcGyrbvEh0IX92L erYJ4eHg1yjzmajPaB21K1aDHpKdDcO2nN99RCmM6dGDdzyOUVMaRkVsFzE5bsuXXNjL WPiWghW42uWn7FZtP51anfAkOrNhyzqZJrvZZ0gcXcRNZSt3qaVzV2VegNLiM4t+caUd uEgg== X-Gm-Message-State: AOAM532/mGIoZuHUvFBhIsTMBPXrJcLuWqR7i10gSarD4kCAW7+xpsZb QMr2kcskhmgjdGVQBlai+SfvupCl X-Google-Smtp-Source: ABdhPJwpbbwdg8nu8BQuGEczDISF4tLxzm6RyDqv3rO/ZQGnXSEHrER7oiOOKBtqbzDOqiedAJGw+A== X-Received: by 2002:a2e:9bc1:: with SMTP id w1mr1616152ljj.290.1622103258850; Thu, 27 May 2021 01:14:18 -0700 (PDT) Return-Path: Received: from jade.urgonet (h-79-136-85-3.A175.priv.bahnhof.se. [79.136.85.3]) by smtp.gmail.com with ESMTPSA id z10sm133186lfe.228.2021.05.27.01.14.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 May 2021 01:14:18 -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 v2 1/5] tee: add sec_world_id to struct tee_shm Date: Thu, 27 May 2021 10:14:00 +0200 Message-Id: <20210527081404.1433177-2-jens.wiklander@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210527081404.1433177-1-jens.wiklander@linaro.org> References: <20210527081404.1433177-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 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; }; /**