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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20141216192740.GN24110@csclub.uwaterloo.ca>
Date:	Tue, 16 Dec 2014 14:27:40 -0500
From:	"Lennart Sorensen" <lsorense@...lub.uwaterloo.ca>
To:	Nishanth Menon <nm@...com>
Cc:	Lokesh Vutla <lokeshvutla@...com>, t-kristo@...com,
	linux-omap@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org, Sekhar Nori <nsekhar@...com>
Subject: Re: [PATCH 2/2] ARM: omap5/dra7xx: Fix counter frequency drift for
 AM572x errata i856.

> I see why arch_timer_freq might skip the rounding error of 39, 15 and
> 55 Vs existing logic which is possibly at a truncation error risk
> (without errata for sysclk 13, 26 and 27MHz).
> 
> all you'd probably need to do is cast rate, num and den to unsigned
> long and have a common computation logic.

If that is acceptable, then sure I can do that.  I liked avoiding casts
in general though.

> if you'd really want to handle truncation error, it must be a separate
> patch of it's own - I would not mix it with the errata fix.

Well there is no error in the existing code because the rate / den
is always a clean integer division.  The problem is introduced by the
SYSCLK1 / 610 used by the emulated clock which is not a clean division.

So for the existing logic, the calculation was perfect.  It is only for
the errata case that it is a problem.

So I think leaving the existing calculation but moved up works well,
and then having the alternate order calculation only in the errata case
seemed cleaner and avoids casts and 64bit math which I thought was
overall desirable.

-- 
Len Sorensen
--
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