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]
Date: Tue, 26 Mar 2024 02:36:22 -0700
From: Ron Economos <re@...z.net>
To: Sasha Levin <sashal@...nel.org>, linux-kernel@...r.kernel.org,
 stable@...r.kernel.org
Cc: Audra Mitchell <audra@...hat.com>, Tejun Heo <tj@...nel.org>
Subject: Re: [PATCH 6.8 002/715] workqueue.c: Increase workqueue name length

On 3/24/24 3:23 PM, Sasha Levin wrote:
> From: Audra Mitchell <audra@...hat.com>
>
> [ Upstream commit 31c89007285d365aa36f71d8fb0701581c770a27 ]
>
> Currently we limit the size of the workqueue name to 24 characters due to
> commit ecf6881ff349 ("workqueue: make workqueue->name[] fixed len")
> Increase the size to 32 characters and print a warning in the event
> the requested name is larger than the limit of 32 characters.
>
> Signed-off-by: Audra Mitchell <audra@...hat.com>
> Signed-off-by: Tejun Heo <tj@...nel.org>
> Stable-dep-of: 5797b1c18919 ("workqueue: Implement system-wide nr_active enforcement for unbound workqueues")
> Signed-off-by: Sasha Levin <sashal@...nel.org>
> ---
>   kernel/workqueue.c | 8 ++++++--
>   1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/workqueue.c b/kernel/workqueue.c
> index 7b482a26d7419..8a06fddb23e66 100644
> --- a/kernel/workqueue.c
> +++ b/kernel/workqueue.c
> @@ -108,7 +108,7 @@ enum {
>   	RESCUER_NICE_LEVEL	= MIN_NICE,
>   	HIGHPRI_NICE_LEVEL	= MIN_NICE,
>   
> -	WQ_NAME_LEN		= 24,
> +	WQ_NAME_LEN		= 32,
>   };
>   
>   /*
> @@ -4666,6 +4666,7 @@ struct workqueue_struct *alloc_workqueue(const char *fmt,
>   	va_list args;
>   	struct workqueue_struct *wq;
>   	struct pool_workqueue *pwq;
> +	int len;
>   
>   	/*
>   	 * Unbound && max_active == 1 used to imply ordered, which is no longer
> @@ -4692,9 +4693,12 @@ struct workqueue_struct *alloc_workqueue(const char *fmt,
>   	}
>   
>   	va_start(args, max_active);
> -	vsnprintf(wq->name, sizeof(wq->name), fmt, args);
> +	len = vsnprintf(wq->name, sizeof(wq->name), fmt, args);
>   	va_end(args);
>   
> +	if (len >= WQ_NAME_LEN)
> +		pr_warn_once("workqueue: name exceeds WQ_NAME_LEN. Truncating to: %s\n", wq->name);
> +
>   	max_active = max_active ?: WQ_DFL_ACTIVE;
>   	max_active = wq_clamp_max_active(max_active, flags, wq->name);
>   

Minor issue. The upstream commit 
8318d6a6362f5903edb4c904a8dd447e59be4ad1 "workqueue: Shorten 
events_freezable_power_efficient name" goes with this patch. Otherwise 
the warning "kernel: workqueue: name exceeds WQ_NAME_LEN. Truncating to: 
events_freezable_power_efficien" occurs.

Same for 6.7.11-rc2 and 6.6.23-rc2.



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ