From: Kees Cook <keescook@chromium.org>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Andy Shevchenko <andy@kernel.org>,
Azeem Shaikh <azeemshaikh38@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
Andy Whitcroft <apw@canonical.com>, Joe Perches <joe@perches.com>,
Dwaipayan Ray <dwaipayanray1@gmail.com>,
Lukas Bulwahn <lukas.bulwahn@gmail.com>,
linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] string: Remove strlcpy()
Date: Fri, 19 Jan 2024 11:58:34 -0800 [thread overview]
Message-ID: <202401191141.F6902E74D@keescook> (raw)
In-Reply-To: <CAHp75VerSqay6cxRQOihC321BbpAWd_TB6aPigN8XZZ=KPXtHA@mail.gmail.com>
On Fri, Jan 19, 2024 at 06:05:19PM +0200, Andy Shevchenko wrote:
> On Fri, Jan 19, 2024 at 12:33 AM Kees Cook <keescook@chromium.org> wrote:
> >
> > With all the users of strlcpy() removed[1] from the kernel, remove the
> > API, self-tests, and other references. Leave mentions in Documentation
> > (about its deprecation), and in checkpatch.pl (to help migrate host-only
> > tools/ usage). Long live strscpy().
>
> ...
>
> > * Copies at most dstsize - 1 bytes into the destination buffer.
> > - * Unlike strlcpy the destination buffer is always padded out.
> > + * Unlike strscpy the destination buffer is always padded out.
>
> While at it, please use the strscpy() form to refer to the function.
Oh, with the trailing "()"? Sure! Good call.
-Kees
> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Thanks!
-Kees
--
Kees Cook
prev parent reply other threads:[~2024-01-19 19:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-18 22:33 [PATCH] string: Remove strlcpy() Kees Cook
2024-01-19 16:05 ` Andy Shevchenko
2024-01-19 19:58 ` Kees Cook [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=202401191141.F6902E74D@keescook \
--to=keescook@chromium.org \
--cc=akpm@linux-foundation.org \
--cc=andy.shevchenko@gmail.com \
--cc=andy@kernel.org \
--cc=apw@canonical.com \
--cc=azeemshaikh38@gmail.com \
--cc=dwaipayanray1@gmail.com \
--cc=joe@perches.com \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lukas.bulwahn@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.