[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3a773edf-f850-e83d-828d-19f91a373384@infradead.org>
Date: Thu, 9 Jun 2022 16:14:57 -0700
From: Randy Dunlap <rdunlap@...radead.org>
To: Bill Wendling <morbo@...gle.com>, isanbard@...il.com
Cc: Tony Luck <tony.luck@...el.com>, Borislav Petkov <bp@...en8.de>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
"H. Peter Anvin" <hpa@...or.com>,
Phillip Potter <phil@...lpotter.co.uk>,
Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
Jan Kara <jack@...e.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Pablo Neira Ayuso <pablo@...filter.org>,
Jozsef Kadlecsik <kadlec@...filter.org>,
Florian Westphal <fw@...len.de>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>,
Nathan Chancellor <nathan@...nel.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Tom Rix <trix@...hat.com>,
Daniel Kiper <daniel.kiper@...cle.com>,
Ross Philipson <ross.philipson@...cle.com>,
linux-edac@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-acpi@...r.kernel.org, linux-mm@...ck.org,
netfilter-devel@...r.kernel.org, coreteam@...filter.org,
netdev@...r.kernel.org, alsa-devel@...a-project.org,
llvm@...ts.linux.dev
Subject: Re: [PATCH 01/12] x86/mce: use correct format characters
On 6/9/22 15:16, Bill Wendling wrote:
> From: Bill Wendling <isanbard@...il.com>
>
> When compiling with -Wformat, clang emits the following warnings:
>
> arch/x86/kernel/cpu/mce/core.c:295:9: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security]
> panic(msg);
> ^~~
>
> Use a string literal for the format string.
>
> Link: https://github.com/ClangBuiltLinux/linux/issues/378
> Signed-off-by: Bill Wendling <isanbard@...il.com>
> ---
> arch/x86/kernel/cpu/mce/core.c | 2 +-
> scripts/Makefile.extrawarn | 4 ++--
Where is the scripts/ change?
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/arch/x86/kernel/cpu/mce/core.c b/arch/x86/kernel/cpu/mce/core.c
> index 2c8ec5c71712..3d411b7c85ad 100644
> --- a/arch/x86/kernel/cpu/mce/core.c
> +++ b/arch/x86/kernel/cpu/mce/core.c
> @@ -292,7 +292,7 @@ static noinstr void mce_panic(const char *msg, struct mce *final, char *exp)
> if (!fake_panic) {
> if (panic_timeout == 0)
> panic_timeout = mca_cfg.panic_timeout;
> - panic(msg);
> + panic("%s", msg);
> } else
> pr_emerg(HW_ERR "Fake kernel panic: %s\n", msg);
>
--
~Randy
Powered by blists - more mailing lists