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
| ||
|
Date: Wed, 24 Oct 2018 13:09:07 -0700 From: "dbasehore ." <dbasehore@...omium.org> To: sboyd@...nel.org Cc: linux-kernel <linux-kernel@...r.kernel.org>, linux-clk@...r.kernel.org, linux-arm-kernel@...ts.infradead.org, linux-rockchip@...ts.infradead.org, linux-doc@...r.kernel.org, Michael Turquette <mturquette@...libre.com>, Heiko Stübner <heiko@...ech.de>, aisheng.dong@....com, mchehab+samsung@...nel.org, corbet@....net, Stephen Boyd <sboyd@...eaurora.org>, jbrunet@...libre.com Subject: Re: [PATCH 1/6] clk: Remove recursion in clk_core_{prepare,enable}() On Wed, Oct 24, 2018 at 6:07 AM Stephen Boyd <sboyd@...nel.org> wrote: > > Quoting Derek Basehore (2018-10-23 18:31:27) > > From: Stephen Boyd <sboyd@...eaurora.org> > > > > Enabling and preparing clocks can be written quite naturally with > > recursion. We start at some point in the tree and recurse up the > > tree to find the oldest parent clk that needs to be enabled or > > prepared. Then we enable/prepare and return to the caller, going > > back to the clk we started at and enabling/preparing along the > > way. > > > > The problem is recursion isn't great for kernel code where we > > have a limited stack size. Furthermore, we may be calling this > > code inside clk_set_rate() which also has recursion in it, so > > we're really not looking good if we encounter a tall clk tree. > > > > Let's create a stack instead by looping over the parent chain and > > collecting clks of interest. Then the enable/prepare becomes as > > simple as iterating over that list and calling enable. > > > > Cc: Jerome Brunet <jbrunet@...libre.com> > > Signed-off-by: Stephen Boyd <sboyd@...eaurora.org> > > Signed-off-by: Derek Basehore <dbasehore@...omium.org> > > Did you change anything substantially? Or is it just a resend of my > patch from a while ago? If you can add a link to the original and also > describe what changed in a maintainer tag it would be much easier for me > to compare. > It should just be your patch with the compilation warning fixed. This is picked up from https://lore.kernel.org/patchwork/patch/814369/
Powered by blists - more mailing lists