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:   Mon, 27 Nov 2017 16:25:45 +0100
From:   Arnd Bergmann <arnd@...db.de>
To:     Hans Verkuil <hverkuil@...all.nl>
Cc:     Mauro Carvalho Chehab <mchehab@...nel.org>,
        y2038 Mailman List <y2038@...ts.linaro.org>,
        Javier Martinez Canillas <javier@....samsung.com>,
        Vincent ABRIOU <vincent.abriou@...com>,
        Ingo Molnar <mingo@...nel.org>,
        Linux Media Mailing List <linux-media@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 6/8] [media] vivid: use ktime_t for timestamp calculation

On Mon, Nov 27, 2017 at 4:14 PM, Hans Verkuil <hverkuil@...all.nl> wrote:

>> -     ktime_get_ts(&ts);
>> -     use_alternates = ts.tv_sec % 10 >= 5;
>> +     timestamp = ktime_sub(ktime_get(), dev->radio_rds_init_time);
>> +     blk = ktime_divns(timestamp, VIVID_RDS_NSEC_PER_BLK);
>> +     use_alternates = blk % VIVID_RDS_GEN_BLOCKS;
>> +
>
> Almost right. This last line should be:
>
>         use_alternates = (blk / VIVID_RDS_GEN_BLOCKS) & 1;
>
> With that in place it works and you can add my:
>
> Tested-by: Hans Verkuil <hans.verkuil@...co.com>

Makes sense. Sending a fixed version now, thanks a lot for testing!

        Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ