[PATCH] riscv: use sysfs_emit in cpu_show_ghostwrite
Paul Walmsley
pjw at kernel.org
Wed May 13 15:58:30 PDT 2026
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 at linux.dev>
Thanks, queued for v7.2.
- Paul
More information about the linux-riscv
mailing list