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:	Tue, 10 Nov 2015 13:39:44 +0100
From:	Arnd Bergmann <arnd@...db.de>
To:	linux-arm-kernel@...ts.infradead.org
Cc:	Stefano Stabellini <stefano.stabellini@...citrix.com>,
	xen-devel@...ts.xensource.com, linux-kernel@...r.kernel.org,
	Ian.Campbell@...rix.com
Subject: Re: [PATCH v2 7/7] xen/arm: set the system time in Xen via the XENPF_settime64 hypercall

On Tuesday 10 November 2015 11:57:55 Stefano Stabellini wrote:
> +       op.u.settime64.nsecs = now.tv_nsec;
> +       op.u.settime64.system_time = arch_timer_read_counter() * (u64)NSEC_PER_SEC;
> +       do_div(op.u.settime64.system_time, arch_timer_get_rate());

NSEC_PER_SEC is a large number, doesn't that multiplication overflow the
64-bit system_time variable?

> +       printk("GTOD: Setting to %llu.%u at %llu\n",

				   %llu.%09u

so you get the leading zeroes.

> +              op.u.settime64.secs,
> +              op.u.settime64.nsecs,
> +              op.u.settime64.system_time);
> +       (void)HYPERVISOR_platform_op(&op);

	Arnd
--
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