From patchwork Thu Jul 22 12:17:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Wiklander X-Patchwork-Id: 483897 Delivered-To: patches@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp307167jao; Thu, 22 Jul 2021 05:18:09 -0700 (PDT) X-Received: by 2002:ac2:58e8:: with SMTP id v8mr29206878lfo.14.1626956288926; Thu, 22 Jul 2021 05:18:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626956288; cv=none; d=google.com; s=arc-20160816; b=w5KHmHt6Htic4rnD4pHIn7h3Ep9QkNIN0K5fuWVA5j8FnzBGzxlFJKryA6zvc2yHcr dbdVRo73KM5p3yY4mDWv1Z3Xb219XOhv0bfyG1BivSk4nYAD5dEp9RtxqdjDVE3gRJin Jb1cItxnVHHKejWh0YR3z3fFgFfVW4LMRRoVnrDO4k0MqaqwrMG5GEAbeIT+NVeddKQC /IRbrDdwCzEHNBFPKySrPEtx+M1DJoGkBa1zuyB/3pnE0ZmO+pil2skgy20dpDYd5f4h yNz/m/4V1hXVsbPtl1P2t9ri9f1ziB933Oztno8L+ePZBUeQRjWxYGp01tfP3KL+Ix4m F/FA== 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=Jho2K68ga+5iTIj/1FJanSXtGPFIBOymH8GgUKHdmJg=; b=eYg1496TkluxSiJxqwNvTGJMPZfrlzFdXOD8wX6aDvERBk2qGKr3oZw2/663Ws0RJQ gaHVtSiG4ALuRJu8B3/ynsONQ1aVKUnsb+HV0EB1hxwS9nrEKBFogxtuw+tVvW5zclv6 5Q3GuN1V6oL7LrLaQAKS0OOiye9dsoIlgxFjWYJ6DVjb4oJSPIpiMRNawkdpWeHzwzWk aUVfAAG9SQGwJI/sMfM9Ig1kK+AOdepnd3Pz4Tx5rpOaR84+0T3Hv5ehOGYjnkR8yuwC ZYp1qICgSe7/uUVwe7a3QakiqzgppQBqmdiVErbNVIdvdEOzRLGch/ccFUWL/yq0Vd+p f5yQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=n4Cd5KUl; 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 d6sor2713722lji.37.2021.07.22.05.18.08 for (Google Transport Security); Thu, 22 Jul 2021 05:18:08 -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=n4Cd5KUl; 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=Jho2K68ga+5iTIj/1FJanSXtGPFIBOymH8GgUKHdmJg=; b=n4Cd5KUlVp+rn78A7tSLeP1QaCRnUqd5Wo68GOklD8bEXOYq87gcZd5mOYtFr8Jwru VqI6QbD72tfLd26xc7jJwPjsSgpevZ7i7V5uB8e+yWtkDO9IdWspQvYRq2+klkkkjigm BDTLd7cT9nJ+PLLGY/DGEGP0RJSidE5xmun3+CcbvNdCGXW0/N+Ut6+pKZiDf7pZ6XQZ XBDXipn2wntiiUDqGmzxIyF6LyJRhkB0Kmgrb9r6DS80GpUOqZdTxfnm/nPoQLR9p8oC eqvOJ69gI4kq7YoK/Btv/ikDII3s97K7mJnzJEu1PKXXul1rJiCis5xpJcLE+zPzZcUp TnpQ== 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=Jho2K68ga+5iTIj/1FJanSXtGPFIBOymH8GgUKHdmJg=; b=bHStxmE2XkVVW/aC3O5DVTV0AXYHRpVZ+ShCJmcmzwhlA/UGHZ7fB++9ozXTIdPceC 0eYdK/sQfSX5/mPYueE/3AS05b+1ioyDQy3TIBb2AlJ3FTqVGemNkVW9o49/ZNGO0ozX /ojaewpQYaDloiUZjjc1BVaCKGtyJvu6PaBfMjdfU9Hd+nRjVHCD/P3EMdMzzAAhYehx sRwtg+a+woeR87jzSLaepUqj9hJrgCNGhGWqW+FZdrICpRp2f3lmoNnxV7nj9yBmEMZI bSbFwx/vApLDz4V+Y/bF3fYnbvrIWHzo0h2pHIGNTM/Zlykc8P8ukJAV/PLdK6YcAimX mggg== X-Gm-Message-State: AOAM532pqxXaMX1SPTzQDDqgiK48/DziqS4CyVO3UBdW3g1e92VnmzK8 jrSICnnvoJ53a/0ym2UU16w6QSJV X-Google-Smtp-Source: ABdhPJxnX8s7IJblRfGI601d0Xtre+S/15kMK0Xhbddqz/BBy7LbQb6cZZ+5iKTudiLDPhSMvO0beA== X-Received: by 2002:a2e:9695:: with SMTP id q21mr7034810lji.509.1626956287123; Thu, 22 Jul 2021 05:18:07 -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 b41sm845090ljr.67.2021.07.22.05.18.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Jul 2021 05:18: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 v3 1/5] tee: add sec_world_id to struct tee_shm Date: Thu, 22 Jul 2021 14:17:53 +0200 Message-Id: <20210722121757.1944658-2-jens.wiklander@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210722121757.1944658-1-jens.wiklander@linaro.org> References: <20210722121757.1944658-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.31.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; }; /**