netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Shankari02 <shankari.ak0208@gmail.com>
Cc: netdev@vger.kernel.org, allison.henderson@oracle.com,
	davem@davemloft.net, edumazet@google.com, pabeni@redhat.com,
	horms@kernel.org, skhan@linuxfoundation.org
Subject: Re: [PATCH] net: rds: Replace strncpy with strscpy in connection setup
Date: Thu, 24 Apr 2025 18:36:34 -0700	[thread overview]
Message-ID: <20250424183634.02c51156@kernel.org> (raw)
In-Reply-To: <20250423153730.69812-1-shankari.ak0208@gmail.com>

On Wed, 23 Apr 2025 21:07:30 +0530 Shankari02 wrote:
> This patch replaces strncpy() with strscpy(), which is the
> preferred, safer alternative. strscpy() guarantees null-termination
> as long as the destination buffer is non-zero in size, and also
> provides a return value that can be used to detect truncation.
> 
> This change is made in accordance with the Linux kernel
> documentation which marks strncpy() as deprecated for bounded
> string copying:

You need to explain why padding is not necessary.

Please use full name in the Author / From line, like you used in the
Sign-off tag.
-- 
pw-bot: cr

  reply	other threads:[~2025-04-25  1:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-23 15:37 [PATCH] net: rds: Replace strncpy with strscpy in connection setup Shankari02
2025-04-25  1:36 ` Jakub Kicinski [this message]
2025-04-26 19:21   ` [PATCH v2] " Shankari Anand
2025-04-26 19:26     ` Shankari
2025-04-30 18:16       ` Simon Horman
2025-05-21  5:52         ` [PATCH v3] " Shankari Anand
2025-05-21  5:54         ` Shankari Anand
2025-05-21 12:58           ` [PATCH v4] " Shankari Anand
2025-05-21 17:21             ` Allison Henderson
2025-05-21  6:05         ` [PATCH v3] " Shankari Anand
2025-04-28 23:25     ` [PATCH v2] " Allison Henderson
2025-04-29 18:09     ` Jakub Kicinski

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=20250424183634.02c51156@kernel.org \
    --to=kuba@kernel.org \
    --cc=allison.henderson@oracle.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shankari.ak0208@gmail.com \
    --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;
as well as URLs for NNTP newsgroup(s).