Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp3888230rdb; Mon, 11 Dec 2023 03:06:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IEDqFvf4OGzpA+EqUoTLFfZb7dRbUk1IkRommdy10G2TbVRlPsqG2l8rl/TguwmMEIi5H31 X-Received: by 2002:a05:6359:6d4d:b0:170:677d:92 with SMTP id tf13-20020a0563596d4d00b00170677d0092mr2925681rwb.65.1702292784693; Mon, 11 Dec 2023 03:06:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702292784; cv=none; d=google.com; s=arc-20160816; b=0LjyvPRRslh+1PklFizK/sa8VhOWG/fDBGFg+8Yb7FKiyOfZtd4ZpuAQVuWXT+TkMb t2y1BXZg42OtJHD5upgymO4s3mWQGCvveJn1MvYWkEJ0DGRxlQ3hnQT9hP3mt0k/oZXf TzVarApx7/dRPk0UMP6CGHavqeIzHCnvCWH+3wDdpFrE2WoK8CYiW5uYtmoGdzmG4dti 1GeqPFbcOwnVF8ucp1LcKB5JUBUkmV/TEN6wf2dxOsKWvdRhfYBNyGHlQEXKuP9XCGC4 L1aDEGT8Yms7w1az3Fx2CjVR6pOKnMFxtdnPRCVaEUrtNe5Gc9MCtQBGIT0apdK4bJCh 4Iqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=R/tcH+biN7N+m5gUYr/PlFHulVA3RGV8xNSCEsshVMs=; fh=B1NlL/3PQS/8RP1Kz0IVW3DEmee7rmBBuHQgrnZcdRQ=; b=fF8/gVRbuYs7nxd4enS8jRNNGOtbUjbCsTrn64Ixzlds8cMabF+4GwrblpPVFIZfZH OMyMA8ZW3AdjIoUPhSPhkDmKFjex/E0YawY9jMoRHa5WS8kiroRA/viMEPVE4nR9Ah90 nrn74JECoSdDgHO5ssm+1gHDjpwKPgyGm0FcxF7R7tMQbin1siS5RAztrjToDgtd1GEv moj2fs/0aTwAc7HiHq/C8QhpNtcEOGdxxE0oNWDf3mFQsQ9Y3CeoMEfW5qJoAKOvR4yM SFP2Qh5Mzq57F96avBamKHAc2eRpszVD2HhlCe/wBX+95EpbQh2lR5NLeFAMDQlsuXR6 5hOA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xs4all.nl Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id bz10-20020a056a02060a00b005c2203bfc01si6187211pgb.170.2023.12.11.03.06.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 03:06:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xs4all.nl Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 6556E807C861; Mon, 11 Dec 2023 03:05:44 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234444AbjLKLF3 (ORCPT + 99 others); Mon, 11 Dec 2023 06:05:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231734AbjLKLF1 (ORCPT ); Mon, 11 Dec 2023 06:05:27 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66EC7BB for ; Mon, 11 Dec 2023 03:05:34 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D1A52C433C8; Mon, 11 Dec 2023 11:05:28 +0000 (UTC) Message-ID: Date: Mon, 11 Dec 2023 12:05:27 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3,04/21] v4l: add documentation for secure memory flag Content-Language: en-US, nl To: Yunfei Dong , Jeffrey Kardatzke , =?UTF-8?Q?N=C3=ADcolas_F_=2E_R_=2E_A_=2E_Prado?= , Nicolas Dufresne , AngeloGioacchino Del Regno , Benjamin Gaignard , Nathan Hebert Cc: 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> From: Hans Verkuil In-Reply-To: <20231206081538.17056-5-yunfei.dong@mediatek.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Mon, 11 Dec 2023 03:05:44 -0800 (PST) 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. In addition, the title of this table is currently "Memory Consistency Flags": that should be renamed to "Memory Flags". Regards, Hans > > .. raw:: latex >