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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 20 Aug 2020 21:39:12 +0000
From:   Vineeth Pillai <viremana@...ux.microsoft.com>
To:     Michael Kelley <mikelley@...rosoft.com>
Cc:     Haiyang Zhang <haiyangz@...rosoft.com>,
        Stephen Hemminger <sthemmin@...rosoft.com>,
        Wei Liu <wei.liu@...nel.org>,
        KY Srinivasan <kys@...rosoft.com>,
        "linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] hv_utils: return error if host timesysnc update is stale


Hi Michael,

> > +const u64 HOST_TIMESYNC_DELAY_THRESH = 600 * NSEC_PER_SEC;
> 
> Kernel test robot has already complained that this should be static,
> and about the potential overflow based on the types of the constants in
> the right side expression.  I didn't check the details, but I suspect the
> complaint is when building in 32-bit mode.  This code does get built in
> 32-bit mode and it's possible for run 32-bit Linux guests on Hyper-V.
> 
NSEC_PER_SEC is defined long and it caused the warning with i386 build.
Casting it to u64 would fix the issue. Will fix the static warning as well
in the next iteration.

> > +		pr_warn("TIMESYNC IC: Stale time stamp, %llu nsecs old\n",
> > +			HOST_TIMESYNC_DELAY_THRESH);
> 
> Let's provide the timediff_adj in the message instead of the constant
> threshold value so we know the degree of staleness. :-)
> 
> Also, I'm wondering if this should be pr_warn_once().  Presumably
> chronyd or whoever is reading /dev/ptp0 will give up after getting
> this error, but if not, it would be nice to avoid filling up the console
> with these error messages.
> 
Makes sense, will fix this also.

Thanks,
Vineeth

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ