Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp1496865rdb; Mon, 8 Jan 2024 00:30:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IEb7M4LYl778LBrzlH19kPO3U9i7P0lXtHFp/fEc/zWW2/swTR5yITa8SVkzPLaXXfL2skz X-Received: by 2002:a17:902:e983:b0:1d3:abaa:1399 with SMTP id f3-20020a170902e98300b001d3abaa1399mr3887570plb.51.1704702617413; Mon, 08 Jan 2024 00:30:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704702617; cv=none; d=google.com; s=arc-20160816; b=JmHVvr4ZiHnDOlrlS3nQ1iYEYP/PUbXCLxFSfdwM76/THlWWX6LD40IOtng3M8huDD tt70Fo2qv1O2fr6LzWqRZ+2/23pEOwCtxLtDgrtAK1CAi0yLdhsU0ckWr5tcsLv3VSb1 QJge7mgGI2BXHuZbtYYFOWCJ0jQl3Uu/omhrgUuJqDauLFT7LYm/XRxXl7Lwr4BKQ0K5 B4HtMygh3ZtzA4YMmVfP1ory6LvVHmrPL97TFLQFYq+WlpgSZwy34fWH4cZ7Dy7ROVyL BXMpEYKtTtDvhVMGlXdZqbVqnA9m5XUXz0ja2sNYvVKx38cpyN/phd/VNDJ9Zdv9cWg1 OFXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=L1ntSDYdIqiXGmKDUk14VC4eoZWflbnSsw+b9rVVPPs=; fh=BpZzb7Yf5hRC/0PkkqqvYM77wRtoTokIxpfHyPKftaQ=; b=Io8PgGxax0DjCdE3eBSepFbISaI5+kdfAtcFfQIJfuLvU+AbonGe1VmplIwlM9R8Ot bVxfjE8I/IOan8XSegiEAeq+gQLkDiAx/yz/aJVbnxn+lBLFqj5VsCcR2jF4d2lqrMYK KQn00F9Cdgovw69dTiWRXdlbDa4yxKWCfVUjNGtGGT5rGMjg2ssLoUNYgce0/elCNmF5 Dd8LQ4k0tVxFFC2DlxNBIyWsins4ovGqPBWoqbubpELdbRP0B/19S7Gu4anKTyHams6R ikTkQ891FZs6nuYlKAce+osc0vbGXbF0hiDVmPva2sWU6AY7gYO+pRcF0VLjIhLkPwvw Yb5A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-19188-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19188-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xs4all.nl Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id u9-20020a17090282c900b001d4bb7bf9fasi5628305plz.602.2024.01.08.00.30.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 00:30:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-19188-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-19188-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19188-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xs4all.nl Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 38721B21512 for ; Mon, 8 Jan 2024 08:29:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 94421BA29; Mon, 8 Jan 2024 08:29:51 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2603EBA26; Mon, 8 Jan 2024 08:29:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A28AFC433C7; Mon, 8 Jan 2024 08:29:45 +0000 (UTC) Message-ID: <545138cc-2cc1-4da0-9b26-7ebe4241c8df@xs4all.nl> Date: Mon, 8 Jan 2024 09:29:42 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3,04/21] v4l: add documentation for secure memory flag To: Jeffrey Kardatzke Cc: Yunfei Dong , =?UTF-8?Q?N=C3=ADcolas_F_=2E_R_=2E_A_=2E_Prado?= , Nicolas Dufresne , AngeloGioacchino Del Regno , Benjamin Gaignard , Nathan Hebert , Chen-Yu Tsai , Yong Wu , Hsin-Yi Wang , Fritz Koenig , Daniel Vetter , Steve Cho , Sumit Semwal , Brian Starkey , John Stultz , "T . J . Mercier" , =?UTF-8?Q?Christian_K=C3=B6nig?= , Matthias Brugger , dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Project_Global_Chrome_Upstream_Group@mediatek.com References: <20231206081538.17056-1-yunfei.dong@mediatek.com> <20231206081538.17056-5-yunfei.dong@mediatek.com> Content-Language: en-US, nl From: Hans Verkuil In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 04/01/2024 21:05, Jeffrey Kardatzke wrote: > On Mon, Dec 11, 2023 at 3:05 AM Hans Verkuil wrote: >> >> On 06/12/2023 09:15, Yunfei Dong wrote: >>> From: Jeffrey Kardatzke >>> >>> Adds documentation for V4L2_MEMORY_FLAG_SECURE. >>> >>> Signed-off-by: Jeffrey Kardatzke >>> Signed-off-by: Yunfei Dong >>> --- >>> Documentation/userspace-api/media/v4l/buffer.rst | 8 +++++++- >>> 1 file changed, 7 insertions(+), 1 deletion(-) >>> >>> diff --git a/Documentation/userspace-api/media/v4l/buffer.rst b/Documentation/userspace-api/media/v4l/buffer.rst >>> index 52bbee81c080..a5a7d1c72d53 100644 >>> --- a/Documentation/userspace-api/media/v4l/buffer.rst >>> +++ b/Documentation/userspace-api/media/v4l/buffer.rst >>> @@ -696,7 +696,7 @@ enum v4l2_memory >>> >>> .. _memory-flags: >>> >>> -Memory Consistency Flags >>> +Memory Flags >>> ------------------------ >>> >>> .. raw:: latex >>> @@ -728,6 +728,12 @@ Memory Consistency Flags >>> only if the buffer is used for :ref:`memory mapping ` I/O and the >>> queue reports the :ref:`V4L2_BUF_CAP_SUPPORTS_MMAP_CACHE_HINTS >>> ` capability. >>> + * .. _`V4L2-MEMORY-FLAG-SECURE`: >>> + >>> + - ``V4L2_MEMORY_FLAG_SECURE`` >>> + - 0x00000002 >>> + - DMA bufs passed into the queue will be validated to ensure they were >>> + allocated from a secure dma-heap. >> >> Hmm, that needs a bit more work. How about: >> >> - The queued buffers are expected to be in secure memory. If not, an error will be >> returned. This flag can only be used with ``V4L2_MEMORY_DMABUF``. Typically >> secure buffers are allocated using a secure dma-heap. This flag can only be >> specified if the ``V4L2_BUF_CAP_SUPPORTS_SECURE_MEM`` is set. >> > > Thanks Hans. Yunfei, can you integrate this change into the patch please? > >> In addition, the title of this table is currently "Memory Consistency Flags": that >> should be renamed to "Memory Flags". > > Hans, the patch is already renaming the table as you suggested. :) > (unless there's some other spot I'm missing) Sorry for the noise, I missed that change. Regards, Hans >> >> Regards, >> >> Hans >> >>> >>> .. raw:: latex >>> >>