Re: [PATCH] riscv: use sysfs_emit in cpu_show_ghostwrite

From: Paul Walmsley

Date: Wed May 13 2026 - 18:59:08 EST


On Sun, 10 May 2026, Thorsten Blum wrote:

> Replace sprintf() with sysfs_emit() in cpu_show_ghostwrite(), which is
> preferred for formatting sysfs output because it provides safer bounds
> checking.
>
> While the current code only emits fixed strings that fit easily within
> PAGE_SIZE, use sysfs_emit() to follow secure coding best practices.
>
> Signed-off-by: Thorsten Blum <thorsten.blum@xxxxxxxxx>

Thanks, queued for v7.2.


- Paul