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: <4d80594c-9088-5d36-44cd-19a98145095c@linaro.org>
Date:   Thu, 29 Jul 2021 07:13:19 -0400
From:   Thara Gopinath <thara.gopinath@...aro.org>
To:     Viresh Kumar <viresh.kumar@...aro.org>
Cc:     agross@...nel.org, bjorn.andersson@...aro.org, rui.zhang@...el.com,
        daniel.lezcano@...aro.org, rjw@...ysocki.net, robh+dt@...nel.org,
        steev@...i.org, linux-arm-msm@...r.kernel.org,
        linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
        devicetree@...r.kernel.org
Subject: Re: [Patch v4 3/6] cpufreq: qcom-cpufreq-hw: Add dcvs interrupt
 support



On 7/29/21 2:17 AM, Viresh Kumar wrote:
> On 28-07-21, 18:19, Thara Gopinath wrote:
>> Ha! I was too lazy to write this down! So how about I make this a mutex and
> 
> mutex may not work as you come here from irq.

Hi!

So the interrupt handler is a threaded handler. I moved it in v4 since 
one of the "_opp" api has an underlying mutex and was causing issues. So 
using a mutex should be pretty safe in this case.

> 
>> put mod_delayed_work() inside the lock. So it will be something like below
>>
>> qcom_lmh_dcvs_notify()			qcom_cpufreq_hw_lmh_exit()
>>
>> mutex_lock()				mutex_lock()
>>    if (data->cancel_throttle) {		cancel_throttle = true
>> 	mutex_unlock()			mutex_unlock()
>> 	return				cancel_delayed_work_sync()
>>    }					free_irq()
>>    enable_irq() / mod_delayed_work()
>> mutex_unlock()
>>
>> I will let you break it!
> 
> I can't any further :)
> 
> Consider merging below to this patch, it fixes sever other minor
> issues I see in the code.

IIUC, the main change you are suggesting below is to include 
enable_irq() / mod_delayed_work() under the spin_lock as well. Is that 
right ? In which case isn't a mutex better than spinlock?

> 

-- 
Warm Regards
Thara (She/Her/Hers)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ