From: Joe Perches <joe@perches.com>
To: Len Baker <len.baker@gmx.com>, Kees Cook <keescook@chromium.org>
Cc: "Russell King (Oracle)" <linux@armlinux.org.uk>,
"Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
"Lee Jones" <lee.jones@linaro.org>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
linux-hardening@vger.kernel.org, linux-input@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drivers/input: Remove all strcpy() uses in favor of strscpy()
Date: Sat, 07 Aug 2021 08:17:39 -0700 [thread overview]
Message-ID: <0c1d7c01821f1f0891fd8f13c1e8f9a68bb21717.camel@perches.com> (raw)
In-Reply-To: <20210807140245.GA2688@titan>
On Sat, 2021-08-07 at 16:02 +0200, Len Baker wrote:
> On Sun, Aug 01, 2021 at 09:44:33AM -0700, Kees Cook wrote:
[]
> > One thing is clear: replacing strlcpy() with strscpy() is probably the
> > easiest and best first step to cleaning up the proliferation of str*()
> > functions.
>
> Thanks for all this info. I will work on it (clean up the proliferation
> of str*() functions).
btw:
It's not possible to sed as the return value is different,
but here is a cocci script that converts strlcpy to strscpy
when the return value is unused.
@@
expression e1, e2, e3;
@@
- strlcpy(
+ strscpy(
e1, e2, e3);
This cocci script was used on sound/ awhile back.
see commit 75b1a8f9d62e.
next prev parent reply other threads:[~2021-08-07 15:17 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-01 14:43 [PATCH] drivers/input: Remove all strcpy() uses in favor of strscpy() Len Baker
2021-08-01 15:00 ` Russell King (Oracle)
2021-08-01 15:57 ` Len Baker
2021-08-01 16:44 ` Kees Cook
2021-08-01 17:19 ` Dmitry Torokhov
2021-08-02 16:17 ` Kees Cook
2021-08-03 7:07 ` Kees Cook
2021-08-03 7:18 ` Hans Verkuil
2021-08-07 14:02 ` Len Baker
2021-08-07 15:17 ` Joe Perches [this message]
2021-08-08 11:30 ` Len Baker
2021-08-01 16:39 ` Joe Perches
2021-08-01 16:55 ` Joe Perches
2021-08-02 16:13 ` Kees Cook
2021-08-02 18:57 ` Joe Perches
2021-08-07 14:10 ` Len Baker
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=0c1d7c01821f1f0891fd8f13c1e8f9a68bb21717.camel@perches.com \
--to=joe@perches.com \
--cc=dmitry.torokhov@gmail.com \
--cc=keescook@chromium.org \
--cc=lee.jones@linaro.org \
--cc=len.baker@gmx.com \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=u.kleine-koenig@pengutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).