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]
Date:   Wed, 17 Oct 2018 23:50:25 +0300
From:   Laurent Pinchart <laurent.pinchart@...asonboard.com>
To:     Tomasz Figa <tfiga@...omium.org>
Cc:     Heng-Ruey Hsu <henryhsu@...omium.org>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        Linux Media Mailing List <linux-media@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Ricky Liang <jcliang@...omium.org>
Subject: Re: [PATCH] media: uvcvideo: Add boottime clock support

Hi Tomasz,

On Wednesday, 17 October 2018 11:28:52 EEST Tomasz Figa wrote:
> On Wed, Oct 17, 2018 at 5:02 PM Laurent Pinchart wrote:
> > On Wednesday, 17 October 2018 10:52:42 EEST Heng-Ruey Hsu wrote:
> >> Android requires camera timestamps to be reported with
> >> CLOCK_BOOTTIME to sync timestamp with other sensor sources.
> > 
> > What's the rationale behind this, why can't CLOCK_MONOTONIC work ? If the
> > monotonic clock has shortcomings that make its use impossible for proper
> > synchronization, then we should consider switching to CLOCK_BOOTTIME
> > globally in V4L2, not in selected drivers only.
> 
> CLOCK_BOOTTIME includes the time spent in suspend, while
> CLOCK_MONOTONIC doesn't. I can imagine the former being much more
> useful for anything that cares about the actual, long term, time
> tracking. Especially important since suspend is a very common event on
> Android and doesn't stop the time flow there, i.e. applications might
> wake up the device to perform various tasks at necessary times.

Sure, but this patch mentions timestamp synchronization with other sensors, 
and from that point of view, I'd like to know what is wrong with the monotonic 
clock if all devices use it.

> Generally, I'd see a V4L2_BUF_FLAG_TIMESTAMP_BOOTTIME flag being added
> and user space being given choice to select the time stamp base it
> needs, perhaps by setting the flag in v4l2_buffer struct at QBUF time?

I would indeed prefer a mechanism specified at the V4L2 API level, with an 
implementation in the V4L2 core, over a module parameter. If the goal is to 
use the boottime clock for synchronization purpose, we need to make sure that 
all drivers will support it correctly. Patching drivers one by one doesn't 
really scale.

-- 
Regards,

Laurent Pinchart



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ