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]
Date:	Wed, 1 Jul 2015 11:22:58 -0700
From:	John Stultz <john.stultz@...aro.org>
To:	Wang YanQing <udknight@...il.com>,
	John Stultz <john.stultz@...aro.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	lkml <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3] timekeeping: always make sure wall_to_monotonic isn't positive

On Tue, Jun 23, 2015 at 3:38 AM, Wang YanQing <udknight@...il.com> wrote:
> I meet two issues on an IMX6 development board without enable
> RTC device(so timekeeping_init will initialize the boot time
> and monotonic to 0).
>
> Issue 1:exportfs -a generate:
>        "exportfs: /opt/nfs/arm does not support NFS export"
> Issue 2:cat /proc/stat:
>        "btime 4294967236"
>
> Exact reproduction of the same issues on x86 after run below
> code:
> "       int main(void)
>         {
>             struct timeval val;
>             int ret;
>
>             val.tv_sec = 0;
>             val.tv_usec = 0;
>             ret = settimeofday(&val, NULL);
>             return 0;
>         }
> "
> Two issues are different symptoms of same problem:
> The reason is positive wall_to_monotonic push boot time back to the time
> before Epoch, getboottime will return negative value.
>
> In symptom 1:
>           negative boot time cause get_expiry overflow time_t when input expire
>           time is 2147483647, then cache_flush always clear entries just added
>           in ip_map_parse.
> In symptom 2:
>           show_stat use "unsigned long" to print
>           negative value return by getboottime.
>
> This patch fix the problem.
>
> Impact:
> You can't set the CLOCK_REALTIME time prior to (1970 + system uptime).
>
> Signed-off-by: Wang YanQing <udknight@...il.com>

Ok, the patch looks alright. The commit message is still not super
readable, but I went ahead and re-worded much of it. I've got it
queued for 4.3, and will be doing some testing. When I sent my stack
out to Thomas/Ingo for -tip, please review the rewording to make sure
you agree with the changes.

thanks
-john
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ