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: <DC5FSK5QO5B4.2IJ9JV7V88Z96@google.com>
Date: Mon, 18 Aug 2025 09:13:25 +0000
From: Brendan Jackman <jackmanb@...gle.com>
To: Thorsten Blum <thorsten.blum@...ux.dev>, Thomas Gleixner <tglx@...utronix.de>, 
	Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>, 
	Dave Hansen <dave.hansen@...ux.intel.com>, <x86@...nel.org>, 
	"H. Peter Anvin" <hpa@...or.com>, Brian Gerst <brgerst@...il.com>, 
	"Peter Zijlstra (Intel)" <peterz@...radead.org>, "Xin Li (Intel)" <xin@...or.com>, 
	Pawan Gupta <pawan.kumar.gupta@...ux.intel.com>, 
	"Ahmed S. Darwish" <darwi@...utronix.de>
Cc: Ingo Molnar <mingo@...nel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x86/common: Replace deprecated strcpy() with strscpy()

On Sat Aug 16, 2025 at 3:28 PM UTC, Thorsten Blum wrote:
> strcpy() is deprecated; use strscpy() instead.

Seems like a good NOP to me.

Reviewed-By: Brendan Jackman <jackmanb@...gle.com>

> Link: https://github.com/KSPP/linux/issues/88
> Signed-off-by: Thorsten Blum <thorsten.blum@...ux.dev>
> ---
> Note: I already submitted this in April as part of another patch [1]
> which doesn't apply anymore. Submitting this again as a separate patch.
> [1]: https://lore.kernel.org/lkml/20250425074917.1531-3-thorsten.blum@linux.dev/
> ---
>  arch/x86/kernel/cpu/common.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
> index 34a054181c4d..8aa170762cc7 100644
> --- a/arch/x86/kernel/cpu/common.c
> +++ b/arch/x86/kernel/cpu/common.c
> @@ -184,9 +184,9 @@ static void default_init(struct cpuinfo_x86 *c)
>  	if (c->cpuid_level == -1) {
>  		/* No cpuid. It must be an ancient CPU */
>  		if (c->x86 == 4)
> -			strcpy(c->x86_model_id, "486");
> +			strscpy(c->x86_model_id, "486");
>  		else if (c->x86 == 3)
> -			strcpy(c->x86_model_id, "386");
> +			strscpy(c->x86_model_id, "386");
>  	}
>  #endif
>  }
> @@ -2013,7 +2013,7 @@ static void identify_cpu(struct cpuinfo_x86 *c)
>  		const char *p;
>  		p = table_lookup_model(c);
>  		if (p)
> -			strcpy(c->x86_model_id, p);
> +			strscpy(c->x86_model_id, p);
>  		else
>  			/* Last resort... */
>  			sprintf(c->x86_model_id, "%02x/%02x",


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ