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: <20200220191513.GA3450796@kroah.com>
Date:   Thu, 20 Feb 2020 20:15:13 +0100
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Orson Zhai <orson.unisoc@...il.com>
Cc:     MyungJoo Ham <myungjoo.ham@...sung.com>,
        Kyungmin Park <kyungmin.park@...sung.com>,
        Chanwoo Choi <cw00.choi@...sung.com>,
        John Stultz <john.stultz@...aro.org>, mingmin.ling@...soc.com,
        orsonzhai@...il.com, jingchao.ye@...soc.com,
        linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
        stable@...r.kernel.org
Subject: Re: [PATCH] Revert "PM / devfreq: Modify the device name as
 devfreq(X) for sysfs"

On Fri, Feb 21, 2020 at 01:37:04AM +0800, Orson Zhai wrote:
> This reverts commit 4585fbcb5331fc910b7e553ad3efd0dd7b320d14.
> 
> The name changing as devfreq(X) breaks some user space applications,
> such as Android HAL from Unisoc and Hikey [1].
> The device name will be changed unexpectly after every boot depending
> on module init sequence. It will make trouble to setup some system
> configuration like selinux for Android.
> 
> So we'd like to revert it back to old naming rule before any better
> way being found.
> 
> [1] https://lkml.org/lkml/2018/5/8/1042
> 
> Cc: John Stultz <john.stultz@...aro.org>
> Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> Cc: stable@...r.kernel.org
> Signed-off-by: Orson Zhai <orson.unisoc@...il.com>
> 
> ---
>  drivers/devfreq/devfreq.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
> index cceee8b..7dcf209 100644
> --- a/drivers/devfreq/devfreq.c
> +++ b/drivers/devfreq/devfreq.c
> @@ -738,7 +738,6 @@ struct devfreq *devfreq_add_device(struct device *dev,
>  {
>  	struct devfreq *devfreq;
>  	struct devfreq_governor *governor;
> -	static atomic_t devfreq_no = ATOMIC_INIT(-1);
>  	int err = 0;
>  
>  	if (!dev || !profile || !governor_name) {
> @@ -800,8 +799,7 @@ struct devfreq *devfreq_add_device(struct device *dev,
>  	devfreq->suspend_freq = dev_pm_opp_get_suspend_opp_freq(dev);
>  	atomic_set(&devfreq->suspend_count, 0);
>  
> -	dev_set_name(&devfreq->dev, "devfreq%d",
> -				atomic_inc_return(&devfreq_no));
> +	dev_set_name(&devfreq->dev, "%s", dev_name(dev));
>  	err = device_register(&devfreq->dev);
>  	if (err) {
>  		mutex_unlock(&devfreq->lock);
> -- 
> 2.7.4
> 

Thanks for this, I agree, this needs to get back to the way things were
as it seems to break too many existing systems as-is.

I'll queue this up in my tree now, thanks.

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ