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] [day] [month] [year] [list]
Date:   Fri, 21 May 2021 15:01:02 +0200
From:   "Rafael J. Wysocki" <rjw@...ysocki.net>
To:     viresh.kumar@...aro.org, linux-kernel@...r.kernel.org,
        kyle.meyer@....com
Cc:     Kyle Meyer <kyle.meyer@....com>
Subject: Re: [PATCH] acpi-cpufreq: Skip initialization if a cpufreq driver exists

On Tuesday, May 18, 2021 9:34:55 PM CEST kyle.meyer@....com wrote:
> From: Kyle Meyer <kyle.meyer@....com>
> 
> Revert part of commit 75c0758137c7a
> ("acpi-cpufreq: Fail initialization if driver cannot be registered").
> 
> acpi-cpufreq is mutually exclusive with intel_pstate, however,
> acpi-cpufreq is loaded multiple times during startup while intel_pstate is
> enabled. On systems using systemd the kernel triggers one uevent for each
> device as a result of systemd-udev-trigger.service. The service exists to
> retrigger all devices as uevents sent by the kernel before systemd-udevd
> is running are missed. The delay caused by systemd-udevd repeatedly loading
> the driver, getting a fail return, and unloading the driver twice per
> logical CPU has a significant impact on the startup time, and can cause
> some devices to be unavailable after reaching the root login prompt.
> 
> Load the driver once but skip initialization if a cpufreq driver exists by
> changing the return value of cpufreq_get_current_driver() from -EEXIST to
> 0.
> 
> Signed-off-by: Kyle Meyer <kyle.meyer@....com>
> ---
>  drivers/cpufreq/acpi-cpufreq.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c
> index 7e7450453714..e79a945369d1 100644
> --- a/drivers/cpufreq/acpi-cpufreq.c
> +++ b/drivers/cpufreq/acpi-cpufreq.c
> @@ -1003,7 +1003,7 @@ static int __init acpi_cpufreq_init(void)
>  
>  	/* don't keep reloading if cpufreq_driver exists */
>  	if (cpufreq_get_current_driver())
> -		return -EEXIST;
> +		return 0;
>  
>  	pr_debug("%s\n", __func__);
>  
> 

Please resend this with CCs to linux-pm@...r.kernel.org and linux-acpi@...r.kernel.org.

Thanks!




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ