Re: [PATCH] mm/damon/sysfs-schemes: avoid Wformat-security warning

From: SeongJae Park
Date: Mon Mar 10 2025 - 12:54:51 EST


On Mon, 10 Mar 2025 09:17:58 -0700 SeongJae Park <sj@xxxxxxxxxx> wrote:

> On Mon, 10 Mar 2025 14:51:37 +0100 Arnd Bergmann <arnd@xxxxxxxxxx> wrote:
>
> > From: Arnd Bergmann <arnd@xxxxxxxx>
> >
> > This warning is for potentially user-defined format strings:
> >
> > mm/damon/sysfs-schemes.c:1664:4: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security]
> > 1664 | name);
> >
> > Change this to use "%s" as the format and the name as the argument.
>
> Thank you for this patch!

I also found there is another similar issue and sent another patch[1] for that.
Thank you again for sharing the issue.

[1] https://lore.kernel.org/20250310165009.652491-1-sj@xxxxxxxxxx


Thanks,
SJ

[...]