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]
Message-ID: <2f4967f2a079e23b2b8a6013012c66e0.sboyd@kernel.org>
Date:   Wed, 29 Mar 2023 14:27:08 -0700
From:   Stephen Boyd <sboyd@...nel.org>
To:     Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
Cc:     Michael Turquette <mturquette@...libre.com>,
        linux-kernel@...r.kernel.org, Jonathan Corbet <corbet@....net>,
        linux-clk@...r.kernel.org, kernel@...gutronix.de,
        linux-doc@...r.kernel.org
Subject: Re: [PATCH v4] clk: expand clk_ignore_unused mechanism to keep only a few clks on

Quoting Uwe Kleine-König (2023-03-29 13:46:32)
> > > diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
> > > index c3c3f8c07258..356119a7e5fe 100644
> > > --- a/drivers/clk/clk.c
> > > +++ b/drivers/clk/clk.c
> > > [...]
> > > @@ -1352,12 +1354,17 @@ static void __init clk_disable_unused_subtree(struct clk_core *core)
> > >          * back to .disable
> > >          */
> > >         if (clk_core_is_enabled(core)) {
> > > -               trace_clk_disable(core);
> > > -               if (core->ops->disable_unused)
> > > -                       core->ops->disable_unused(core->hw);
> > > -               else if (core->ops->disable)
> > > -                       core->ops->disable(core->hw);
> > > -               trace_clk_disable_complete(core);
> > > +               if (clk_unused_keep_on) {
> > > +                       pr_warn("Keep unused clk \"%s\" on\n", core->name);
> > > +                       clk_unused_keep_on -= 1;
> > > +               } else {
> > > +                       trace_clk_disable(core);
> > 
> > We have trace_clk_disable() here. Can you have this tracepoint print to
> > the kernel log and watch over serial console? That would be faster than
> > bisecting.
> 
> Well no, that doesn't work for all the problems where
> clk_ignore_unused=7 could be useful. Consider that e.g. you know that
> eth0 is broken, but with clk_ignore_unused is works. So one of the (say)
> 25 nominally unused clks are required for eth0. But it's not possible to
> test the network after each of the 25 clk_disable()s. Unless I'm missing
> something and you can hook a userspace action on a trace line?!

In that case it sounds like you want to compile the kernel with the
support for enabling clks from debugfs. Can you use that?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ