From: Justin Stitt <justinstitt@google.com>
To: Mariia Nikitash <nikitash.mariiaw@gmail.com>
Cc: krzk@kernel.org, s.nawrocki@samsung.com,
peter.griffin@linaro.org, linusw@kernel.org,
alim.akhtar@samsung.com, linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org, linux-gpio@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org,
morbo@google.com, kees@kernel.org,
aleksandr.loktionov@intel.com,
codemender-patching+linux@google.com
Subject: Re: [PATCH] pinctrl: samsung: Use snprintf() to construct pin bank names
Date: Mon, 28 Sep 2026 14:43:32 -0700 [thread overview]
Message-ID: <arrfZ5CYyLt0vwu5@google.com> (raw)
In-Reply-To: <20260927190758.609156-1-nikitash.mariiaw@gmail.com>
Hi,
On Sun, Sep 27, 2026 at 12:07:58PM -0700, Mariia Nikitash wrote:
> From: Bill Wendling <morbo@google.com>
>
> samsung_banks_node_get() constructs each pin bank node name by copying
> bank->name with strscpy() and appending the suffix with strlcat().
>
> In preparation for removing the deprecated strlcat() API[1], format the
> node name in a single snprintf() call, which preserves the existing
> truncation check against sizeof(node_name).
>
> Link: https://github.com/KSPP/linux/issues/370 [1]
> Cc: codemender-patching+linux@google.com
> Assisted-by: LLM
> Signed-off-by: Bill Wendling <morbo@google.com>
> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
> Signed-off-by: Mariia Nikitash <nikitash.mariiaw@gmail.com>
Are you forwarding this patch on behalf of Bill? I see Bill as the
author of the commit and I recall seeing this in some series he sent
earlier [1] and this patch you've sent doesn't seem to be a v2.
Let me know what your role is on this patch and why it has been
separated out from Bill's series.
It is entirely possible that I am lacking context. Please fill me in :)
> ---
> drivers/pinctrl/samsung/pinctrl-samsung.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/pinctrl/samsung/pinctrl-samsung.c b/drivers/pinctrl/samsung/pinctrl-samsung.c
> index 5ecc9ed4c44d..0d639eec689c 100644
> --- a/drivers/pinctrl/samsung/pinctrl-samsung.c
> +++ b/drivers/pinctrl/samsung/pinctrl-samsung.c
> @@ -1155,8 +1155,7 @@ static void samsung_banks_node_get(struct device *dev, struct samsung_pinctrl_dr
>
> bank = d->pin_banks;
> for (i = 0; i < d->nr_banks; ++i, ++bank) {
> - strscpy(node_name, bank->name, sizeof(node_name));
> - len = strlcat(node_name, suffix, sizeof(node_name));
> + len = snprintf(node_name, sizeof(node_name), "%s%s", bank->name, suffix);
> if (len >= sizeof(node_name)) {
> dev_err(dev, "Too long pin bank name '%s', ignoring\n",
> bank->name);
> --
> 2.43.0
>
>
[1]: https://lore.kernel.org/all/20260915081910.4142719-17-morbo@google.com/
Thanks
Justin
next prev parent reply other threads:[~2026-09-28 21:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-27 19:07 [PATCH] pinctrl: samsung: Use snprintf() to construct pin bank names Mariia Nikitash
2026-09-28 21:43 ` Justin Stitt [this message]
2026-09-28 22:00 ` Bill Wendling
2026-09-28 22:07 ` Justin Stitt
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=arrfZ5CYyLt0vwu5@google.com \
--to=justinstitt@google.com \
--cc=aleksandr.loktionov@intel.com \
--cc=alim.akhtar@samsung.com \
--cc=codemender-patching+linux@google.com \
--cc=kees@kernel.org \
--cc=krzk@kernel.org \
--cc=linusw@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=morbo@google.com \
--cc=nikitash.mariiaw@gmail.com \
--cc=peter.griffin@linaro.org \
--cc=s.nawrocki@samsung.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.