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] [day] [month] [year] [list]
Message-ID: <CAJZ5v0jRooZSJP1wRHD7NN2rkEpsJ-tkk5Z7_Xw1xcQaiUQwpw@mail.gmail.com>
Date:   Tue, 29 Nov 2016 13:49:56 +0100
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     Viresh Kumar <viresh.kumar@...aro.org>
Cc:     Rafael Wysocki <rjw@...ysocki.net>, jy0922.shim@...sung.com,
        Viresh Kumar <vireshk@...nel.org>, Nishanth Menon <nm@...com>,
        Stephen Boyd <sboyd@...eaurora.org>,
        Lists linaro-kernel <linaro-kernel@...ts.linaro.org>,
        Linux PM <linux-pm@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Vincent Guittot <vincent.guittot@...aro.org>,
        "# v4 . 4+" <stable@...r.kernel.org>
Subject: Re: [PATCH V3] PM / OPP: Don't remove the first cpu in the mask
 before removing others

On Tue, Nov 29, 2016 at 6:42 AM, Viresh Kumar <viresh.kumar@...aro.org> wrote:
> Joonyoung Shim reported an interesting problem on his ARM octa-core
> Odoroid-XU3 platform. During system suspend, dev_pm_opp_put_regulator()
> was failing for a struct device for which dev_pm_opp_set_regulator() is
> called earlier.
>
> This happened because an earlier call to
> dev_pm_opp_of_cpumask_remove_table() function (from cpufreq-dt.c file)
> removed all the entries from opp_table->dev_list apart from the last CPU
> device in the cpumask of CPUs sharing the OPP.
>
> But both dev_pm_opp_set_regulator() and dev_pm_opp_put_regulator()
> routines get CPU device for the first CPU in the cpumask. And so the OPP
> core failed to find the OPP table for the struct device.
>
> In order to fix that up properly, we need to revisit APIs like
> dev_pm_opp_set_regulator() and make them talk in terms of cookies
> provided by the OPP core. But such a solution will be hard to backport
> to stable kernels.
>
> This patch attempts to fix this problem (in a Hacky way) by specially
> handling the first cpu in the mask. A FIXME is also added to make sure
> that this Hack doesn't get unnoticed later on.
>
> Cc:  # v4.4+ <stable@...r.kernel.org>
> Signed-off-by: Viresh Kumar <viresh.kumar@...aro.org>
> ---
> V2->V3:
> - Fix $Subject, which carried text from V1.
>
> V1->V2:
> - A completely different approach, more of hack so that backport to
>   stable kernels can be done easily.
> - A more comprehensive solution is required to fix the design flaws.

I'll wait for a response from Stephen this time.

Thanks,
Rafael

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ