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 <[email protected]>

Applied to accel/habanalabs-next, thanks.

Reply via email to