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: <9883272f-cffd-e550-f784-32977bace0c0@xs4all.nl>
Date:	Mon, 15 Aug 2016 15:31:14 +0200
From:	Hans Verkuil <hverkuil@...all.nl>
To:	Robert Jarzmik <robert.jarzmik@...e.fr>,
	Mauro Carvalho Chehab <mchehab@...nel.org>
Cc:	Guennadi Liakhovetski <g.liakhovetski@....de>,
	Jiri Kosina <trivial@...nel.org>, linux-kernel@...r.kernel.org,
	linux-media@...r.kernel.org
Subject: Re: [PATCH v3 09/14] media: platform: pxa_camera: add buffer
 sequencing

On 08/15/2016 03:26 PM, Robert Jarzmik wrote:
> Robert Jarzmik <robert.jarzmik@...e.fr> writes:
> 
>> Add sequence numbers to completed buffers.
>>
>> Signed-off-by: Robert Jarzmik <robert.jarzmik@...e.fr>
>> ---
>>  drivers/media/platform/soc_camera/pxa_camera.c | 5 +++++
>>  1 file changed, 5 insertions(+)
>>
>> diff --git a/drivers/media/platform/soc_camera/pxa_camera.c b/drivers/media/platform/soc_camera/pxa_camera.c
>> index d66443ac1f4d..8a65f126d091 100644
>> --- a/drivers/media/platform/soc_camera/pxa_camera.c
>> +++ b/drivers/media/platform/soc_camera/pxa_camera.c
>> @@ -401,6 +402,7 @@ static void pxa_camera_start_capture(struct pxa_camera_dev *pcdev)
>>  	unsigned long cicr0;
>>  
>>  	dev_dbg(pcdev_to_dev(pcdev), "%s\n", __func__);
>> +	pcdev->buf_sequence = 0;
> 
> I'm not so sure this is the right place to reset the buffer sequence.
> 
> I've seen no documentation on the rules applicable to this sequence number:
>  - should it be reset if a "start streaming" operation occurs ?

start_streaming is the recommended place for setting the counter to 0. It's what
v4l2-compliance expects.

It is not documented since 1) not every driver does this and 2) there may
be cases where this behavior is not desired.

That said, I have yet to see a driver where zeroing this in start_streaming
is not appropriate.

Regards,

	Hans

>  - should it be reset if a streams stops by lack of video buffers queued ?
>  - should it be reset in queue_setup() like in other drivers ?
> 
> Or should it _never_ be reset and only be a monotonic raising number ?
> 
> Cheers.
> 
> --
> Robert
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ