From: "Sinyuk, Konstantin" <konstantin.sinyuk@intel.com>
To: Shi Hao <i.shihao.999@gmail.com>, <koby.elbaz@intel.com>
Cc: <ogabbay@kernel.org>, <dri-devel@lists.freedesktop.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] accel: goya: replace sprintf() with sysfs_emit()
Date: Sat, 29 Nov 2025 22:35:16 +0200 [thread overview]
Message-ID: <6d67ec3a-54dc-4e26-ac5c-480b72a00399@intel.com> (raw)
In-Reply-To: <20251030183529.93665-1-i.shihao.999@gmail.com>
On 10/30/2025 8:35 PM, Shi Hao wrote:
> Replace deprecated sprintf() with sysfs_emit() in various sysfs show
> functions to avoid buffer overflows.
>
> The sysfs_emit() function is specifically designed for sysfs show handlers
> and provides built-in bounds checking by limiting output to PAGE_SIZE,
> unlike sprintf() which has no bounds checking. This prevents buffer
> overflows that could result in kernel crashes or potential security
> vulnerabilities.
>
> Convert sprintf() to sysfs_emit() as per kernel code practices and
> guidelines.
>
> Signed-off-by: Shi Hao <i.shihao.999@gmail.com>
Applied to accel/habanalabs-next, thanks.
prev parent reply other threads:[~2025-11-29 20:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-30 18:35 Shi Hao
2025-11-29 20:35 ` Sinyuk, Konstantin [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=6d67ec3a-54dc-4e26-ac5c-480b72a00399@intel.com \
--to=konstantin.sinyuk@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=i.shihao.999@gmail.com \
--cc=koby.elbaz@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ogabbay@kernel.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
all inboxes | Powered by JetHome®