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>] [day] [month] [year] [list]
Date:	Tue, 03 Jul 2012 09:53:27 +0000 (GMT)
From:	MyungJoo Ham <myungjoo.ham@...sung.com>
To:	Xiaoguang Chen <chenxg@...vell.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Cc:	¹Ú°æ¹Î <kyungmin.park@...sung.com>,
	"mturquette@...com" <mturquette@...com>,
	"axel.lin@...il.com" <axel.lin@...il.com>
Subject: Re: [PATCH] PM: Devfreq: fix userspace governor frequency bug

> The frequency set by userspace governor may not the
> same as the final frequency. If this condition happens,
> then "cat set_freq" will return a wrong value which is
> inconsistant with the real frequency.
> 
> This patch updates data->user_frequency after calling
> of update_devfreq. use devfreq->revious_freq as the
> final user_frequency.
> 
> Signed-off-by: Xiaoguang Chen <chenxg@...vell.com>

No, this is not a bug.

---- quoting Documentation/ABI/testing/sysfs-class-devfreq ----
What:           /sys/class/devfreq/.../userspace/set_freq
Date:           September 2011
Contact:        MyungJoo Ham <myungjoo.ham@...sung.com>
Description:
                The /sys/class/devfreq/.../userspace/set_freq shows and
                sets the requested frequency for the devfreq object if         
                userspace governor is in effect.
---- quote ended ----

set_freq shows the requested frequency, not the actual frequency value.

If you want to see the actual current frequency intended by devfreq,
use "cur_freq".



Cheers!
MyungJoo


> ---
>  drivers/devfreq/governor_userspace.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/devfreq/governor_userspace.c b/drivers/devfreq/governor_userspace.c
> index 0681246..85ad80a 100644
> --- a/drivers/devfreq/governor_userspace.c
> +++ b/drivers/devfreq/governor_userspace.c
> @@ -59,6 +59,7 @@ static ssize_t store_freq(struct device *dev, struct device_attribute *attr,
>  	err = update_devfreq(devfreq);
>  	if (err == 0)
>  		err = count;
> +	data->user_frequency = devfreq->previous_freq;
>  	mutex_unlock(&devfreq->lock);
>  	return err;
>  }
> -- 
> 1.7.0.4
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ