From mboxrd@z Thu Jan 1 00:00:00 1970 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 0CD81C433F5 for ; Wed, 6 Oct 2021 08:38:05 +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 D2D9561139 for ; Wed, 6 Oct 2021 08:38:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D2D9561139 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=forissier.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:In-Reply-To:MIME-Version:Date: Message-ID:From:References:Cc:To:Subject:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=/hrGjKtbZUfpP+3GJfXXVZJUNMd+TGfpFbaPeU8Eyg8=; b=kEbxx5Et/Q1GAxyrW6wJiKmylk Bpi37MYqpsXG+5tV2I69iiHUqeWOR/hRf1Twe2Xnf5UenVrPoryjxrXtIiCVN/aMe/cKNcJQGjMc9 YFkHpOvJo/wOh5xPhGjB6ajcNHmj5LlBPVZGHy7Uyu9/rY67qeLdgZ6w5epFbAJFT1tY7vuvnYBP1 qd7pSm1EM3SPjZa7NDiZKu8nHzzU9wl3Xkkr5nCxAIv8VYVQR+4ZXAmsvBdKQc+5oo+fl/DTsDWtw Du6/o6hzfgPuVy+8RKweVdRgmTy/wdb24IrcovQG5ZA3NRNx/TnYAuiQp7YOwA8XYv93fMVUIYzvK 1UHFUu5Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mY2Pe-00DUjC-Q1; Wed, 06 Oct 2021 08:36:30 +0000 Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mY2Pb-00DUhs-Fr for linux-arm-kernel@lists.infradead.org; Wed, 06 Oct 2021 08:36:28 +0000 Received: by mail-ed1-x534.google.com with SMTP id f9so6933170edx.4 for ; Wed, 06 Oct 2021 01:36:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=forissier-org.20210112.gappssmtp.com; s=20210112; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=1tBZGy5fjJyJT/4JFxiN73sucm9vQCvvn6+DPKKJICA=; b=2CuFqvJr513dWu1skEcdBu0Nq4oS4MA2bRqLND1PG6Awe+zw7N+fuyUpXlk8wIP37w w9+mAAwFj8UiP2CHLps/tDB0WQes/G0Z4M1oS2eSpSP63ikcXMbUkXWLbMF3og4MhWch FPNpmUAZUlbcrW3BFJ51+Y9UO+lurBInwO5bxpxUaPLV3+8pIUMCTcwvHklHhuFQroYY JgzwPJIk6RuZasrp+RoGZRxNjYFoH+ECEn4sCtqmre4FELGgSHHod8otLwWnEK+VFgDj 896sCkd52xRl9ZQuJye8gZeJGVag5iB5yiDtmFF1d1w9MN8QNhviZTXNDXirgXEwcNKw tSLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=1tBZGy5fjJyJT/4JFxiN73sucm9vQCvvn6+DPKKJICA=; b=MKlQR+501BtXCrYsbZ/1SQkYzqPPEPMB+/z4I+D9dI8651msV14Sdo4NXjvclOT6/8 hZTzV79IAD8dBArHThsTISDylZq9P/8GqBLgqdYQmRFlRXGHIiM/YY/o9934E2r2dlsU 1NNj4czpiJSr4nvJMm97YqsaUIssNt94TL+DyKQ8ZeIHFLHaD8AMCGpkhnnjrrLZt/IO o/ffb9FVhd/VeFOaFPuS+xpjNZOx3vSAltXmAvyZBQSRyWh3CTrkcKZXfADQFccjkfHa sWU4nry4nGu53nVR7IJKzbTrzcPAV94w/T+0HuJTvIXxlHKJPo3LIZQpavLtM/l399H4 lQLg== X-Gm-Message-State: AOAM530kBEAwIL4ymJZJ9Lo3JzHbsjlJQFoBrmT85VmPvngbV5XmnfhY aDmtKuq9jYSWn++9WcMDJ3+jUA== X-Google-Smtp-Source: ABdhPJwwn6FIVs2SyZPbbAfEcgEqJBvREAVmQV/FN+Zsg0aF/NHMIARtLR+lRfOmVjdC0nF8FdMSwg== X-Received: by 2002:a17:906:1dc4:: with SMTP id v4mr30818651ejh.282.1633509384396; Wed, 06 Oct 2021 01:36:24 -0700 (PDT) Received: from ?IPv6:2a01:e0a:3cb:7bb0:f7e3:cb47:8607:1e3? ([2a01:e0a:3cb:7bb0:f7e3:cb47:8607:1e3]) by smtp.gmail.com with ESMTPSA id b13sm11604804ede.97.2021.10.06.01.36.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 06 Oct 2021 01:36:23 -0700 (PDT) Subject: Re: [PATCH v6 1/5] tee: add sec_world_id to struct tee_shm To: Jens Wiklander , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, op-tee@lists.trustedfirmware.org Cc: Sumit Garg , Sudeep Holla , Marc Bonnici , sughosh.ganu@linaro.org References: <20211006070902.2531311-1-jens.wiklander@linaro.org> <20211006070902.2531311-2-jens.wiklander@linaro.org> From: Jerome Forissier Message-ID: <2af3eda2-2ceb-4812-a813-ae3dff02cdac@forissier.org> Date: Wed, 6 Oct 2021 10:36:22 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20211006070902.2531311-2-jens.wiklander@linaro.org> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211006_013627_611530_DC8C54F3 X-CRM114-Status: GOOD ( 23.03 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 10/6/21 9:08 AM, Jens Wiklander wrote: > 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; Wouldn't it make more sense to have this outside struct tee_shm in a driver-specific struct? (which could always be obtained from a struct tee_shm * using container_of() for example). > }; > > /** > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel