From: Chris Lew <christopher.lew@oss.qualcomm.com>
To: Vishnu Santhosh <vishnu.santhosh@oss.qualcomm.com>
Cc: Bjorn Andersson <andersson@kernel.org>,
Mathieu Poirier <mathieu.poirier@linaro.org>,
deepak.singh@oss.qualcomm.com, chris.lew@oss.qualcomm.com,
linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org,
linux-kernel@vger.kernel.org,
Sudeepgoud Patil <quic_sudeepgo@quicinc.com>
Subject: Re: [PATCH] rpmsg: glink: Replace strcpy() with strscpy()
Date: Thu, 29 Jan 2026 16:25:08 -0800 [thread overview]
Message-ID: <aXv6ZEFWRj6pxxwQ@hu-clew-lv.qualcomm.com> (raw)
In-Reply-To: <20251211-rpmsg-glink-strcpy-replace-v1-1-be06308e5724@oss.qualcomm.com>
On Thu, Dec 11, 2025 at 02:18:34PM +0530, Vishnu Santhosh wrote:
> From: Sudeepgoud Patil <quic_sudeepgo@quicinc.com>
>
> Replace strcpy() with the safer strscpy() to address unsafe API
> usage warnings[1] from static analysis tools, as strcpy() performs
> no bounds checking on the destination buffer.
>
> [1] https://www.kernel.org/doc/html/latest/process/deprecated.html#strcpy
>
> Signed-off-by: Sudeepgoud Patil <quic_sudeepgo@quicinc.com>
> Signed-off-by: Vishnu Santhosh <vishnu.santhosh@oss.qualcomm.com>
> ---
> drivers/rpmsg/qcom_glink_native.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Reviewed-by: Chris Lew <christopher.lew@oss.qualcomm.com>
> diff --git a/drivers/rpmsg/qcom_glink_native.c b/drivers/rpmsg/qcom_glink_native.c
> index 5ea096acc8581b1aff106f4c0e2f9aee9d56e25b..37b2255495d53270521466a05a5eb97eca98ec0e 100644
> --- a/drivers/rpmsg/qcom_glink_native.c
> +++ b/drivers/rpmsg/qcom_glink_native.c
> @@ -501,7 +501,7 @@ static int qcom_glink_send_open_req(struct qcom_glink *glink,
> req->cmd = cpu_to_le16(GLINK_CMD_OPEN);
> req->param1 = cpu_to_le16(channel->lcid);
> req->param2 = cpu_to_le32(name_len);
> - strcpy(req->data, channel->name);
> + strscpy(req->data, channel->name, GLINK_NAME_SIZE);
>
> trace_qcom_glink_cmd_open_tx(glink->label, channel->name,
> channel->lcid, channel->rcid);
>
> ---
> base-commit: d358e5254674b70f34c847715ca509e46eb81e6f
> change-id: 20251203-rpmsg-glink-strcpy-replace-738ab624071f
>
> Best regards,
> --
> Vishnu Santhosh <vishnu.santhosh@oss.qualcomm.com>
>
next prev parent reply other threads:[~2026-01-30 0:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-11 8:48 Vishnu Santhosh
2026-01-30 0:25 ` Chris Lew [this message]
2026-07-10 18:07 ` Bjorn Andersson
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=aXv6ZEFWRj6pxxwQ@hu-clew-lv.qualcomm.com \
--to=christopher.lew@oss.qualcomm.com \
--cc=andersson@kernel.org \
--cc=chris.lew@oss.qualcomm.com \
--cc=deepak.singh@oss.qualcomm.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=quic_sudeepgo@quicinc.com \
--cc=vishnu.santhosh@oss.qualcomm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®