From: Ruben Wauters <rubenru09@aol.com>
To: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>
Cc: Ruben Wauters <rubenru09@aol.com>, linux-kernel@vger.kernel.org
Subject: [PATCH] x86/cpu/amd: replace strcpy with strscpy
Date: Wed, 30 Apr 2025 00:03:59 +0100 [thread overview]
Message-ID: <20250429230710.54014-1-rubenru09@aol.com> (raw)
In-Reply-To: <20250429230710.54014-1-rubenru09.ref@aol.com>
strcpy is deprecated due to issues with bounds checking and overflows
this patch replaces strcpy with the preferred strscpy
Signed-off-by: Ruben Wauters <rubenru09@aol.com>
---
arch/x86/kernel/cpu/amd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
index 1f7925e45b46..32c78784f96e 100644
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
@@ -643,7 +643,7 @@ static void init_amd_k8(struct cpuinfo_x86 *c)
}
if (!c->x86_model_id[0])
- strcpy(c->x86_model_id, "Hammer");
+ strscpy(c->x86_model_id, "Hammer");
#ifdef CONFIG_SMP
/*
--
2.48.1
next parent reply other threads:[~2025-04-29 23:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20250429230710.54014-1-rubenru09.ref@aol.com>
2025-04-29 23:03 ` Ruben Wauters [this message]
2025-04-30 18:40 ` [tip: x86/cleanups] x86/CPU/AMD: Replace strcpy() with strscpy() tip-bot2 for Ruben Wauters
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250429230710.54014-1-rubenru09@aol.com \
--to=rubenru09@aol.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®