lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5c397f03-ffcf-6686-aa43-393771533cae@xs4all.nl>
Date:   Fri, 28 Feb 2020 09:49:45 +0100
From:   Hans Verkuil <hverkuil@...all.nl>
To:     Sergey Senozhatsky <senozhatsky@...omium.org>
Cc:     Hans Verkuil <hans.verkuil@...co.com>,
        Tomasz Figa <tfiga@...omium.org>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        Kyungmin Park <kyungmin.park@...sung.com>,
        Marek Szyprowski <m.szyprowski@...sung.com>,
        Sakari Ailus <sakari.ailus@....fi>,
        Laurent Pinchart <laurent.pinchart@...asonboard.com>,
        Pawel Osciak <posciak@...omium.org>,
        linux-media@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCHv3 05/11] videobuf2: handle V4L2_FLAG_MEMORY_NON_CONSISTENT
 flag

On 2/28/20 2:38 AM, Sergey Senozhatsky wrote:
> On (20/02/27 13:36), Hans Verkuil wrote:
>>> diff --git a/Documentation/media/uapi/v4l/vidioc-create-bufs.rst b/Documentation/media/uapi/v4l/vidioc-create-bufs.rst
>>> index bd08e4f77ae4..6a8a4d5de2f1 100644
>>> --- a/Documentation/media/uapi/v4l/vidioc-create-bufs.rst
>>> +++ b/Documentation/media/uapi/v4l/vidioc-create-bufs.rst
>>> @@ -121,7 +121,13 @@ than the number requested.
>>>  	other changes, then set ``count`` to 0, ``memory`` to
>>>  	``V4L2_MEMORY_MMAP`` and ``format.type`` to the buffer type.
>>>      * - __u32
>>> -      - ``reserved``\ [7]
>>> +      - ``flags``
>>> +      - Specifies additional buffer management attributes.
>>> +	See :ref:`memory-flags`. Old drivers and applications must set it to
>>> +	zero.
>>
>> Drop the last sentence, it's not relevant.
> 
> OK.
> 
>>> +
>>> +    * - __u32
>>> +      - ``reserved``\ [6]
>>>        - A place holder for future extensions. Drivers and applications
>>>  	must set the array to zero.
>>
>> Old drivers and applications still think reserved is [7] and will zero this.
> 
> OK.
> 
> Hmm... If those apps use hard-coded size then we might have a problem.
> If they use sizeof(reserved) then everything is OK. Shall we also have
> a union here?

No, apps will use sizeof(reserved).

Regards,

	Hans

> 
>>> diff --git a/Documentation/media/uapi/v4l/vidioc-reqbufs.rst b/Documentation/media/uapi/v4l/vidioc-reqbufs.rst
>>> index 917df6fb6486..e52cc4401fba 100644
>>> --- a/Documentation/media/uapi/v4l/vidioc-reqbufs.rst
>>> +++ b/Documentation/media/uapi/v4l/vidioc-reqbufs.rst
>>> @@ -112,10 +112,19 @@ aborting or finishing any DMA in progress, an implicit
>>>  	``V4L2_MEMORY_MMAP`` and ``type`` set to the buffer type. This will
>>>  	free any previously allocated buffers, so this is typically something
>>>  	that will be done at the start of the application.
>>> -    * - __u32
>>> +    * - union
>>> +      - (anonymous)
>>
>> Anonymous unions are formatted a bit differently (I made a very recent patch
>> that unified the union formatting in the v4l docs). See e.g.
>> Documentation/media/uapi/v4l/vidioc-g-ext-ctrls.rst.
> 
> OK, will take a look.
> 
> 	-ss
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ