From: Yicong Hui <yiconghui@gmail.com>
To: Kees Cook <kees@kernel.org>,
airlied@gmail.com, christian.koenig@amd.com,
alexander.deucher@amd.com, simona@ffwll.ch
Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
skhan@linuxfoundation.org, david.hunter.linux@gmail.com,
linux-hardening@vger.kernel.org
Subject: Re: [PATCH] drm/amdgpu: Replace deprecated strcpy() in amdgpu_virt_write_vf2pf_data
Date: Wed, 11 Mar 2026 11:52:00 +0000 [thread overview]
Message-ID: <be86c64d-db3f-447b-92e8-085333c28d11@gmail.com> (raw)
In-Reply-To: <202601091117.122A9268@keescook>
On 1/9/26 7:18 PM, Kees Cook wrote:
> On Fri, Jan 09, 2026 at 04:25:14PM +0000, Yicong Hui wrote:
>> strcpy() is deprecated as it does not do any bounds checking (as
>> specified in Documentation/process/deprecated.rst).
>>
>> There is a risk of buffer overflow in the case that the value for
>> THIS_MODULE->version exceeds the 64 characters. This is unlikely, but
>> replacing the deprecated function will pre-emptively remove this risk
>> entirely.
>>
>> Replace both instances of strcpy() with the safer strscpy() function.
>
> This looks correct to me -- dest and src are both fixed-size, so strscpy
> happily checks everything at compile time. :)
>
> Reviewed-by: Kees Cook <kees@kernel.org>
>
> -Kees
>
Hello!
Is there any further feedback or progress on this patch?
Thank you!
Yicong
next prev parent reply other threads:[~2026-03-11 11:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-09 16:25 [PATCH] drm/amdgpu: Replace deprecated strcpy() in amdgpu_virt_write_vf2pf_data Yicong Hui
2026-01-09 19:18 ` Kees Cook
2026-03-11 11:52 ` Yicong Hui [this message]
2026-03-11 13:50 ` Alex Deucher
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=be86c64d-db3f-447b-92e8-085333c28d11@gmail.com \
--to=yiconghui@gmail.com \
--cc=airlied@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=david.hunter.linux@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kees@kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=simona@ffwll.ch \
--cc=skhan@linuxfoundation.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