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] [day] [month] [year] [list]
Message-ID: <871r5o9mdq.ffs@tglx>
Date:   Fri, 17 Sep 2021 00:38:41 +0200
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Arnd Bergmann <arnd@...nel.org>,
        OPENSOURCE Lukas Hannen 
        <lukas.hannen@...nsource.tttech-industrial.com>
Cc:     "EMC: linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "# 3.4.x" <stable@...r.kernel.org>
Subject: Re: [PATCH 5.14 298/334] time: Handle negative seconds correctly in
 timespec64_to_ns()

On Thu, Sep 16 2021 at 22:57, Arnd Bergmann wrote:
> On Thu, Sep 16, 2021 at 6:50 PM OPENSOURCE Lukas Hannen
> <lukas.hannen@...nsource.tttech-industrial.com> wrote:
> I did stumble over one small detail:
>
>         if (ts->tv_sec <= KTIME_SEC_MIN)
>                 return KTIME_MIN;
>
> I think this is not entirely correct for the case of tv_sec==KTIME_SEC_MIN
> with a nonzero tv_nsec, as we now round down to the full second. Not sure
> if that's worth changing, as we also round up for any value between
> KTIME_SEC_MAX*NSEC_PER_SEC and KTIME_MAX, or between
> KTIME_MIN and KTIME_SEC_MIN*NSEC_PER_SEC.
> In practice I guess we care very little about the last nanosecond in the corner
> cases.

It's completely irrelevant whether the result is off by one second
related to the 292 years limit.

Thanks,

        tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ