linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: <yang.yang29@zte.com.cn>
Cc: <wuchi.zero@gmail.com>, <axboe@kernel.dk>,
	<colin.i.king@gmail.com>, <linux-kernel@vger.kernel.org>,
	<xu.panda@zte.com.cn>
Subject: Re: [PATCH linux-next] relay: use strscpy() is more robust and safer
Date: Mon, 21 Nov 2022 17:07:54 -0800	[thread overview]
Message-ID: <20221121170754.b5f7f57960596a146832d189@linux-foundation.org> (raw)
In-Reply-To: <202211220853259244666@zte.com.cn>

On Tue, 22 Nov 2022 08:53:25 +0800 (CST) <yang.yang29@zte.com.cn> wrote:

> From: Xu Panda <xu.panda@zte.com.cn>
> 
> The implementation of strscpy() is more robust and safer.
> That's now the recommended way to copy NUL terminated strings.

I really see no benefit to this switch in this situation.  What am I
missing?

But I guess this:

hp2:/usr/src/linux-6.1-rc4> grep -r strlcpy . | wc
    400    1913   34402
hp2:/usr/src/linux-6.1-rc4> grep -r strscpy . | wc 
   2824   11990  266471

is a good enough reason for applying.


      reply	other threads:[~2022-11-22  1:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-22  0:53 [PATCH linux-next] relay: use strscpy() is more robust and safer yang.yang29
2022-11-22  1:07 ` Andrew Morton [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=20221121170754.b5f7f57960596a146832d189@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=axboe@kernel.dk \
    --cc=colin.i.king@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wuchi.zero@gmail.com \
    --cc=xu.panda@zte.com.cn \
    --cc=yang.yang29@zte.com.cn \
    /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).