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: <zgjqt7nbjwyv5ge2mxjhalx6msdpmnp2fcuyt5h5cjy3rrw3mk@nsyy7ee5ii2f>
Date: Wed, 28 Feb 2024 16:22:48 -0600
From: Andrew Halaney <ahalaney@...hat.com>
To: Javier Martinez Canillas <javierm@...hat.com>
Cc: linux-kernel@...r.kernel.org, javier@...hile0.org, 
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>, "Rafael J. Wysocki" <rafael@...nel.org>
Subject: Re: [PATCH v3] driver core: Don't set a deferred probe timeout if
 modules are disabled

On Wed, Feb 28, 2024 at 12:09:02AM +0100, Javier Martinez Canillas wrote:
> There is no point to schedule the workqueue to timeout the deferred probe,
> if all the initcalls are done and modules are not enabled. The default for
> this case is already 0 but can be overridden by the deferred_probe_timeout
> parameter. Let's just skip this and avoid queuing work that is not needed.
> 
> Signed-off-by: Javier Martinez Canillas <javierm@...hat.com>

Reviewed-by: Andrew Halaney <ahalaney@...hat.com>

> ---
> 
> Changes in v3:
> - Just skip setting the deferred_probe_timeout parameter when modules
>   are disabled (Andrew Halaney).
> 
>  drivers/base/dd.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/base/dd.c b/drivers/base/dd.c
> index 85152537dbf1..48a45860d2bb 100644
> --- a/drivers/base/dd.c
> +++ b/drivers/base/dd.c
> @@ -266,6 +266,13 @@ static int __init deferred_probe_timeout_setup(char *str)
>  {
>  	int timeout;
>  
> +	/*
> +	 * If loadable modules support is disabled, there is no point to
> +	 * set a timeout for the deferred probe and schedule a workqueue.
> +	 */
> +	if (!IS_ENABLED(CONFIG_MODULES))
> +		return 1;
> +
>  	if (!kstrtoint(str, 10, &timeout))
>  		driver_deferred_probe_timeout = timeout;
>  	return 1;
> -- 
> 2.43.2
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ