lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220425055935.458583-1-starzhangzsd@gmail.com>
Date:   Mon, 25 Apr 2022 13:59:35 +0800
From:   Stephen Zhang <starzhangzsd@...il.com>
To:     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: [PATCH] x86/traps: add CONFIG_BUG to the use of __warn()

From: zhangshida <zhangshida@...inos.cn>

__warn() is declared when CONFIG_BUG is defined, so add
CONFIG_BUG when used.

Signed-off-by: zhangshida <zhangshida@...inos.cn>
---
 arch/x86/kernel/traps.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
index 1563fb995005..81cc28a59c24 100644
--- 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
 		return;
 	}
 	BUG();
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ