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:   Thu, 25 Aug 2016 17:25:53 +0200 (CEST)
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Nicolai Stange <nicstange@...il.com>
cc:     John Stultz <john.stultz@...aro.org>, linux-kernel@...r.kernel.org
Subject: Re: [RFC v4 22/22] timekeeping: inform clockevents about freq
 adjustments

On Tue, 23 Aug 2016, Nicolai Stange wrote:
> +	raw_spin_lock_irqsave(&clockevents_lock, flags);
> +	list_for_each_entry(dev, &clockevent_devices, list) {
> +		if (!(dev->features & CLOCK_EVT_FEAT_ONESHOT))
> +			continue;
> +
> +		mult_raw = dev->mult;
> +		if (mult_raw != last_mult_raw) {
> +			last_mult_raw = mult_raw;
> +			last_mult_adjusted =
> +				__clockevents_calc_adjust_freq(mult_raw,
> +							mult_cs_mono,
> +							mult_cs_raw);

What makes sure that the resulting shift/mult pair is still valid after this
adjustment? The non adjusted mult/shift pair might be right at the border of
potential overflows and the adjustment might just put it over the edge....
We need at least sanity checks here.

Thanks,

	tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ