All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Korsgaard <peter@korsgaard.com>
To: Sai Krishna Potthuri <sai.krishna.potthuri@amd.com>
Cc: Linus Walleij <linusw@kernel.org>,
	 Michal Simek <michal.simek@amd.com>,
	<linux-gpio@vger.kernel.org>,
	 <linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>,  <saikrishna12468@gmail.com>,
	<git@amd.com>
Subject: Re: [PATCH v2] pinctrl: zynqmp: Ensure function names are NUL terminated
Date: Wed, 18 Nov 2026 17:49:18 +0100	[thread overview]
Message-ID: <87mrr6ultd.fsf@dell.be.48ers.dk> (raw)
In-Reply-To: <20261118111816.2483052-1-sai.krishna.potthuri@amd.com> (Sai Krishna Potthuri's message of "Wed, 18 Nov 2026 16:48:16 +0530")

>>>>> "Sai" == Sai Krishna Potthuri <sai.krishna.potthuri@amd.com> writes:

 > PM_QID_PINCTRL_GET_FUNCTION_NAME returns the function name in a fixed
 > 16-byte field and does not guarantee NUL termination. A 16-character
 > name fills the entire field.
 > The driver copies this field into a 16-byte buffer and subsequently
 > uses it as a C string. For a non-NUL-terminated name, string operations
 > can read past the end of the buffer into the adjacent groups pointer.

 > Reserve an extra byte for the NUL terminator and explicitly terminate
 > the copied function name.

 > Signed-off-by: Sai Krishna Potthuri <sai.krishna.potthuri@amd.com>
 > ---
 > changes in v2:
 > - Replace macro/constants with sizeof()(comment from David Laight)

Reviewed-by: Peter Korsgaard <peter@korsgaard.com>

-- 
Bye, Peter Korsgaard

      parent reply	other threads:[~2026-11-18 16:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-18 11:18 [PATCH v2] pinctrl: zynqmp: Ensure function names are NUL terminated Sai Krishna Potthuri
2026-11-18 11:25 ` sashiko-bot
2026-11-18 16:49 ` Peter Korsgaard [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=87mrr6ultd.fsf@dell.be.48ers.dk \
    --to=peter@korsgaard.com \
    --cc=git@amd.com \
    --cc=linusw@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.simek@amd.com \
    --cc=sai.krishna.potthuri@amd.com \
    --cc=saikrishna12468@gmail.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.