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: 12283677 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,URIBL_BLOCKED, 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 CC014C47089 for ; Thu, 27 May 2021 08:16:32 +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 904FE613AA for ; Thu, 27 May 2021 08:16:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 904FE613AA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@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=ogHKa2aXKMTruKj+M55c6azkkni4YxtsG1viAfziXCY=; b=JDX2f/Wezlb+HP XlAn3ja+OmP4Ey51X2AUEw6vNIiY56SeDmsk7B0yZI2GM3Cjd9u3QA+VqFW73x2ZpbUubWm/11JHD ySOUBXzzbVSGnhTUfFwKFLxP54cGlGRdyUvYgiuxUycw7gTohMkprcRPudcOg6sQDWftr6RNm0r9p 5N2wZ5ACyCzlhTmNQhQhZBbaSEiehT29EzmCNZRuqpXy/m1NKCS4QBbaZsKHv8AyhOX4VvTg4NC9d /Y7FnR4+djzrFspVXa/iYkTVHVwjzpkazkwRFr3IRz2Uhp7nvvNCgQ8Op8KqNwPXYEPjXsjlYwJOx wAKHASLHO7ChtoPAYwCA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lmBA9-003l0b-Nv; Thu, 27 May 2021 08:14:41 +0000 Received: from mail-lj1-x22a.google.com ([2a00:1450:4864:20::22a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lmB9q-003kog-Dh for linux-arm-kernel@lists.infradead.org; Thu, 27 May 2021 08:14:23 +0000 Received: by mail-lj1-x22a.google.com with SMTP id e2so5163455ljk.4 for ; Thu, 27 May 2021 01:14:20 -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=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=p3Z1HEbM56O5Sk/+4tlGArxBJQ0BlT+zF0hjBg2iYgSNjAC6Pj20u2cqsQyqXvZ5OA clW6hvXjJaSKUjlHbX4LiZ7muMAFlIYd2Q7LmZl0mV7C1A7bYeEOLf/uAhsifywdXek3 Jkm+0q3UHM0/0vsDDAWLbmKbdMjfxTBE6U/kuilnO+K0SWreVekOaakTjv29adBaD9pd j8Z9sJ6r87B/F+Kjw+XJRnofZn6A1wqWlEEbEqzeSKfUPATaksP+e4MCVCXlcDd5+aA7 FNQzxJhk51WsDgUg8L4XJlxnGW2pg258a0FUJk97H75Sqf+X/AGAODcqHxT8RQgLTzGz dpfA== X-Gm-Message-State: AOAM532sNT0ePF3EVSshgUd/Wm2cC9vyOA8+EVr0kUJqNm92dDFHbZ9J g/kC7qnt7IzYDDh8OtemCKtmWQ== 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) 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210527_011422_521417_9CF5DBEF X-CRM114-Status: GOOD ( 13.39 ) 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. 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; }; /**