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:	Tue, 05 Aug 2014 06:47:51 -0400
From:	Prarit Bhargava <prarit@...hat.com>
To:	Viresh Kumar <viresh.kumar@...aro.org>
CC:	Stephen Boyd <sboyd@...eaurora.org>,
	Saravana Kannan <skannan@...eaurora.org>,
	"Rafael J. Wysocki" <rjw@...ysocki.net>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Lenny Szubowicz <lszubowi@...hat.com>,
	"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>
Subject: Re: [PATCH] cpufreq, store_scaling_governor requires policy->rwsem
 to be held for duration of changing governors [v2]



On 08/05/2014 03:46 AM, Viresh Kumar wrote:
> On 2 August 2014 01:06, Stephen Boyd <sboyd@...eaurora.org> wrote:
>> I have the same options. The difference is that my driver has a governor
>> per policy. That's set with the CPUFREQ_HAVE_GOVERNOR_PER_POLICY flag.
> 
> You may call me stupid but I got a bit confused after looking into the code
> again. Why does the crash dump depends on this flag?

Nope, not a stupid question.  After reproducing (finally!) yesterday I've been
wondering the same thing.

> 
> We *always* remove the governor specific directory while switching governors
> (Ofcourse only if its updated for All CPUs). And so on a dual core platform,
> where both CPU 0 & 1 share a clock line, switching of governors should result
> in this crash dump?

I've been looking into *exactly* this.  On any platform where
cpu_weight(affected_cpus) == 1 for a particular cpu this lockdep trace should
happen.


> 
> I may know the answer to the stupid question I had, but not sure why that is a
> problem. The only (and quite significant) difference that this flag makes
> is the location of governor-specific directory:
> - w/o this flag: /sys/devices/system/cpu/cpufreq/<here>
> - w/ this flag: /sys/devices/system/cpu/cpu*/cpufreq/<here>
> 

cpufreq_global_kobject vs the policy's kobject.

> So, is there some issue with the sysfs lock for <cpu*/cpufreq/> node as while
> switching governor we change  <cpu*/cpufreq/scaling_governor> at the same
> location?

That's what I'm wondering too.  I'm going to instrument the code to find out
this morning.  I'm wondering if this comes down to a lockdep class issue
(perhaps lockdep puts globally defined locks like cpufreq_global_kobject in a
different class?).

P.
--
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