public inbox for linux-edac@vger.kernel.org
 help / color / mirror / Atom feed
From: Yazen Ghannam <yazen.ghannam@amd.com>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>, Tony Luck <tony.luck@intel.com>,
	Avadhut Naik <avadhut.naik@amd.com>,
	Arnd Bergmann <arnd@arndb.de>, Ingo Molnar <mingo@kernel.org>,
	Qiuxu Zhuo <qiuxu.zhuo@intel.com>,
	Thorsten Blum <thorsten.blum@linux.dev>,
	Mario Limonciello <mario.limonciello@amd.com>,
	linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] EDAC/amd64: avoid -Wformat-security warning
Date: Thu, 4 Dec 2025 11:51:29 -0500	[thread overview]
Message-ID: <20251204165129.GC983706@yaz-khff2.amd.com> (raw)
In-Reply-To: <20251204100231.1034557-1-arnd@kernel.org>

On Thu, Dec 04, 2025 at 11:02:25AM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> Using a variable as a format string causes a (default-disabled) warning:
> 
> drivers/edac/amd64_edac.c: In function 'per_family_init':
> drivers/edac/amd64_edac.c:3914:17: error: format not a string literal and no format arguments [-Werror=format-security]
>  3914 |                 scnprintf(pvt->ctl_name, sizeof(pvt->ctl_name), tmp_name);
>       |                 ^~~~~~~~~
> 
> The code here is safe, but in order to enable the warning by default in
> the future, change this instance to pass the name indirectly.
> 
> Fixes: e9abd990aefd ("EDAC/amd64: Generate ctl_name string at runtime")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---

Reviewed-by: Yazen Ghannam <yazen.ghannam@amd.com>

Thanks,
Yazen

  parent reply	other threads:[~2025-12-04 16:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-04 10:02 [PATCH] EDAC/amd64: avoid -Wformat-security warning Arnd Bergmann
2025-12-04 12:19 ` Zhuo, Qiuxu
2025-12-04 15:51 ` Naik, Avadhut
2025-12-04 16:51 ` Yazen Ghannam [this message]
2025-12-30 16:37 ` Borislav Petkov

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=20251204165129.GC983706@yaz-khff2.amd.com \
    --to=yazen.ghannam@amd.com \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=avadhut.naik@amd.com \
    --cc=bp@alien8.de \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mario.limonciello@amd.com \
    --cc=mingo@kernel.org \
    --cc=qiuxu.zhuo@intel.com \
    --cc=thorsten.blum@linux.dev \
    --cc=tony.luck@intel.com \
    /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