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:	Wed, 15 Apr 2015 10:35:10 +0100
From:	Russell King - ARM Linux <linux@....linux.org.uk>
To:	Xunlei Pang <xlpang@....com>
Cc:	linux-kernel@...r.kernel.org, rtc-linux@...glegroups.com,
	Alessandro Zummo <a.zummo@...ertech.it>,
	John Stultz <john.stultz@...aro.org>,
	Arnd Bergmann <arnd@...db.de>,
	Xunlei Pang <pang.xunlei@...aro.org>
Subject: Re: [PATCH 4/5] drivers/rtc/pl030: Replace deprecated
 rtc_tm_to_time() and rtc_time_to_tm()

On Wed, Apr 15, 2015 at 05:20:10PM +0800, Xunlei Pang wrote:
> From: Xunlei Pang <pang.xunlei@...aro.org>
> 
> The driver uses deprecated rtc_tm_to_time() and rtc_time_to_tm(),
> which will overflow in year 2106 on 32-bit machines.
> 
> This patch solves this by:
>  - Replacing rtc_tm_to_time() with rtc_tm_to_time64()
>  - Replacing rtc_time_to_tm() with rtc_time64_to_tm()
> 
> Cc: Russell King <rmk+kernel@....linux.org.uk>
> Signed-off-by: Xunlei Pang <pang.xunlei@...aro.org>

NAK.

How does this fix anything?  The RTC contains 32-bit registers.  Even
if you convert the struct tm to a 64-bit time, you can only write the
lowest 32-bits to the hardware.  You can onyl read the lowest 32-bits
from the hardware too.

This patch solves /nothing/.  In fact, it hides the fact that this RTC
is unable to represent dates after 2106.

-- 
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.
--
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