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, 12 Jul 2012 12:50:46 +0200
From:	Linus Walleij <linus.walleij@...aro.org>
To:	Mike Turquette <mturquette@...com>, Pawel Moll <pawel.moll@....com>
Cc:	Mike Turquette <mturquette@...aro.org>,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
	stable@...nel.org, Ulf Hansson <ulf.hansson@...ricsson.com>
Subject: Re: [PATCH] clk: allow clocks without parents to change rate

On Thu, Jul 12, 2012 at 1:42 AM, Mike Turquette <mturquette@...com> wrote:

> This has been fixed in Pawell's patch, "clk: Check parent for NULL in
> clk_change_rate".

Yes, that'll probably work.

A small nitpick though:

I have slightly different semantics, Pawel's patch assigns zero if
parent is NULL, then use that as fallback, whereas I check for the
parent being NULL all the way. I was worried that the old sematics
could change like this:

So here it takes that:

+       if (clk->parent)
+               best_parent_rate = clk->parent->rate;
+

And I was cautious that if this changes the parent rate:

+               clk->ops->set_rate(clk->hw, clk->new_rate, best_parent_rate);

Then this passes the old parent rate to the recalc function:

+               clk->rate = clk->ops->recalc_rate(clk->hw, best_parent_rate);

It has no side-effects on my system but I worried about
others, so I just left the behaviour to re-read the rate from the parent
every time if possible.

Yours,
Linus Walleij
--
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