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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKohpom93-q9zN9PgpTs-7E7Bi7N2cdyi4DaitPN8YFCAG1UMw@mail.gmail.com>
Date:	Tue, 29 Apr 2014 13:34:31 +0530
From:	Viresh Kumar <viresh.kumar@...aro.org>
To:	"Srivatsa S. Bhat" <srivatsa.bhat@...ux.vnet.ibm.com>
Cc:	"Rafael J. Wysocki" <rjw@...ysocki.net>,
	Meelis Roos <mroos@...ux.ee>,
	"cpufreq@...r.kernel.org" <cpufreq@...r.kernel.org>,
	"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 5/5] cpufreq: Catch double invocations of cpufreq_freq_transition_begin/end

On 29 April 2014 13:05, Srivatsa S. Bhat
<srivatsa.bhat@...ux.vnet.ibm.com> wrote:
> On 04/29/2014 12:19 PM, Viresh Kumar wrote:
>> +       WARN_ON(!(cpufreq_driver->flags & CPUFREQ_ASYNC_NOTIFICATION)
>>                              && (current == policy->transition_task));
>>
>> which you already mentioned.
>
> Yeah, I think we should just go with this. I thought we needed lots of
> if-conditions to do exclude these drivers (which would have made it ugly),
> but as you pointed above, just this one would suffice.

Okay, I think we can do one more modification here:

>> +       WARN_ON(unlikely(!(cpufreq_driver->flags & CPUFREQ_ASYNC_NOTIFICATION)
>>                              && (current == policy->transition_task)));


> Besides, the cpufreq core doesn't automatically invoke _begin() and
> _end() for ASYNC_NOTIFICATION drivers. So that means the probability
> that such drivers will hit this problem is extremely low, since the
> driver alone is responsible for invoking _begin/_end and hence there
> shouldn't be much of a conflict. So I think we should really just
> skip ASYNC_NOTIFICATION drivers in this debug infrastructure.

The only way it can happen (I don't hope somebody would be so
stupid to call begin twice from target() :)), is via transition notifiers,
which in some case starting a new transition..
--
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