[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7558ae3d-a1fa-6c11-cccd-ad0f65cde25b@intel.com>
Date: Mon, 25 Apr 2022 09:05:17 -0700
From: Dave Hansen <dave.hansen@...el.com>
To: Stephen Zhang <starzhangzsd@...il.com>, tglx@...utronix.de,
mingo@...hat.com, bp@...en8.de, dave.hansen@...ux.intel.com,
x86@...nel.org
Cc: hpa@...or.com, peterz@...radead.org, laijs@...ux.alibaba.com,
lihuafei1@...wei.com, fenghua.yu@...el.com,
chang.seok.bae@...el.com, zhangshida@...inos.cn,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86/traps: add CONFIG_BUG to the use of __warn()
On 4/24/22 22:59, Stephen Zhang wrote:
> --- a/arch/x86/kernel/traps.c
> +++ b/arch/x86/kernel/traps.c
> @@ -246,7 +246,9 @@ DEFINE_IDTENTRY_ERRORCODE(exc_control_protection)
> pr_err("Missing ENDBR: %pS\n", (void *)instruction_pointer(regs));
> if (!ibt_fatal) {
> printk(KERN_DEFAULT CUT_HERE);
> +#ifdef CONFIG_BUG
> __warn(__FILE__, __LINE__, (void *)regs->ip, TAINT_WARN, regs, NULL);
> +#endif
This really should be done with an #ifdef'd stub in in bug.h, not an
#ifdef at every call site. I assume there was a good reason for not
using the normal WARN*() macros.
Powered by blists - more mailing lists