From: Ajith P V <ajithpv.linux@gmail.com>
To: tung.quang.nguyen@est.tech, jmaloy@redhat.com,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, horms@kernel.org
Cc: netdev@vger.kernel.org, tipc-discussion@lists.sourceforge.net,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v3] tipc: replace deprecated strcpy with strscpy in tipc_bearer_get_name()
Date: Tue, 18 Aug 2026 10:11:07 +0000 [thread overview]
Message-ID: <20260818101107.460476-1-ajithpv.linux@gmail.com> (raw)
In-Reply-To: <20260817152350.573c4eff@pumpkin>
Thank you Tung Quang Nguyen and David Laight for the suggestions.
> Should the TIPC_MAX_BEARER_NAME requirement be spelled out in the comment
> or in the prototype, so that the interface and the body agree?
> In the current tree there is no behavioural change: the only caller is
> __tipc_nl_add_monitor() in net/tipc/monitor.c, which declares
> char bearer_name[TIPC_MAX_BEARER_NAME], and the source is
> char name[TIPC_MAX_BEARER_NAME] in struct tipc_bearer, so the copy can
> neither truncate nor overflow.
> The strscpy() return value is also discarded, so a future caller passing a
> smaller buffer would get a silently truncated name plus a return of 0.
> Would passing a size_t len from the caller (sizeof(bearer_name)) and
> forwarding strscpy()'s -E2BIG through the existing int return be preferable
> to a hard-coded bound?
I will update the patch with the above fixes and send the new version after Aug 31st.
Regards,
Ajith P V
prev parent reply other threads:[~2026-08-18 10:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-13 10:22 [PATCH net-next v3] tipc: replace deprecated strcpy with strscpy in tipc_bearer_get_name() Ajith P V
2026-08-14 9:00 ` Tung Quang Nguyen
2026-08-14 12:55 ` Ajith P V
2026-08-14 13:03 ` Tung Quang Nguyen
2026-08-14 16:08 ` Ajith P V
2026-08-17 7:53 ` Tung Quang Nguyen
2026-08-17 14:23 ` David Laight
2026-08-18 10:11 ` Ajith P V [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=20260818101107.460476-1-ajithpv.linux@gmail.com \
--to=ajithpv.linux@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jmaloy@redhat.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=tipc-discussion@lists.sourceforge.net \
--cc=tung.quang.nguyen@est.tech \
/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