From: Wei Yang <richard.weiyang@gmail.com>
To: Maxwell Doose <m32285159@gmail.com>
Cc: rppt@kernel.org, richard.weiyang@gmail.com,
linux-gpio@vger.kernel.org,
open list <linux-kernel@vger.kernel.org>,
linux-mm@kvack.org, Lucas Poupeau <lucasp.linux@gmail.com>
Subject: Re: [RFC] Precarious macro in tools/include/linux/string.h
Date: Wed, 6 May 2026 03:37:04 +0000 [thread overview]
Message-ID: <20260506033704.bpqcp2ydhoc45yda@master> (raw)
In-Reply-To: <CAKqfh0HqJoFRPrgvQG84iFt-0-vQd0fz3x6EPhzTgikss+XiWg@mail.gmail.com>
On Mon, May 04, 2026 at 11:21:35PM -0500, Maxwell Doose wrote:
>Hello Wei and Mike,
>
>I was recently helping a new contributor with their patch replacing
>strcpy() with strscpy() in tools/gpio. After some research I put a
>hold on that and realized that strscpy was defined as strcpy, which is
>extremely precarious and goes against the ideas the kernel has been
>fighting for for years, and I traced that change back to commit
>9e3d665 authored by Wei and merged by Mike. I'm currently working with
>said contributor to get this alias removed and the proper function
>definition added, just wanted to give you a heads up.
Thanks for the effort.
>
>Are there any tools or dependencies that rely on strscpy() being
>aliased to strcpy() before we replace it with the real definition?
>
The alias is introduced to fix the test case in tools/testing/memblock, since
reserved_mem_add() use strscpy() but there is no definition in tools/.
So replace the alias with proper function definition looks good to me.
>best regards,
>max
--
Wei Yang
Help you, Help me
prev parent reply other threads:[~2026-05-06 3:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-05 4:21 [RFC] Precarious macro in tools/include/linux/string.h Maxwell Doose
2026-05-06 3:37 ` Wei Yang [this message]
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=20260506033704.bpqcp2ydhoc45yda@master \
--to=richard.weiyang@gmail.com \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lucasp.linux@gmail.com \
--cc=m32285159@gmail.com \
--cc=rppt@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