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] [day] [month] [year] [list]
Message-ID: <ba8111d4-d695-4ac2-9ccd-5722e6aacd7f@gaisler.com>
Date: Fri, 6 Feb 2026 11:38:20 +0100
From: Andreas Larsson <andreas@...sler.com>
To: Thorsten Blum <thorsten.blum@...ux.dev>,
 "David S. Miller" <davem@...emloft.net>
Cc: sparclinux@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] sparc: vio: Replace snprintf with strscpy in
 vio_create_one

On 2026-01-31 23:44, Thorsten Blum wrote:
> Replace snprintf("%s", ...) with the faster and more direct strscpy().
> 
> Signed-off-by: Thorsten Blum <thorsten.blum@...ux.dev>
> ---
>  arch/sparc/kernel/vio.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/sparc/kernel/vio.c b/arch/sparc/kernel/vio.c
> index 1a1a9d6b8f2e..8c7dd72ef334 100644
> --- a/arch/sparc/kernel/vio.c
> +++ b/arch/sparc/kernel/vio.c
> @@ -12,6 +12,7 @@
>  
>  #include <linux/kernel.h>
>  #include <linux/slab.h>
> +#include <linux/string.h>
>  #include <linux/irq.h>
>  #include <linux/export.h>
>  #include <linux/init.h>
> @@ -378,8 +379,7 @@ static struct vio_dev *vio_create_one(struct mdesc_handle *hp, u64 mp,
>  	 * the parent doesn't require the MD node info.
>  	 */
>  	if (node_name != NULL) {
> -		(void) snprintf(vdev->node_name, VIO_MAX_NAME_LEN, "%s",
> -				node_name);
> +		strscpy(vdev->node_name, node_name);
>  
>  		err = mdesc_get_node_info(hp, mp, node_name,
>  					  &vdev->md_node_info);

Reviewed-by: Andreas Larsson <andreas@...sler.com>

Picking this up to my for-next.

Thanks,
Andreas


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ