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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1568215730-11471-1-git-send-email-lixiaochun.2888@163.com>
Date:   Wed, 11 Sep 2019 23:28:50 +0800
From:   Xiaochun Lee <lixiaochun.2888@....com>
To:     tony.luck@...el.com, bp@...en8.de
Cc:     tglx@...utronix.de, mingo@...hat.com, hpa@...or.com,
        x86@...nel.org, linux-edac@...r.kernel.org,
        linux-kernel@...r.kernel.org, lixiaochun.2888@....com,
        Xiaochun Lee <lixc17@...ovo.com>
Subject: [PATCH] x86/mce: add a switch of CONFIG_X86_MCELOG_LEGACY

From: Xiaochun Lee <lixc17@...ovo.com>

Add CONFIG_X86_MCELOG_LEGACY to control the
behavior of several functions be compiled.

Signed-off-by: Xiaochun Lee <lixc17@...ovo.com>
---
 arch/x86/kernel/cpu/mce/dev-mcelog.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/mce/dev-mcelog.c b/arch/x86/kernel/cpu/mce/dev-mcelog.c
index 7c8958d..6add0ce 100644
--- a/arch/x86/kernel/cpu/mce/dev-mcelog.c
+++ b/arch/x86/kernel/cpu/mce/dev-mcelog.c
@@ -82,7 +82,7 @@ static void mce_do_trigger(struct work_struct *work)
 
 static DECLARE_WORK(mce_trigger_work, mce_do_trigger);
 
-
+#ifdef CONFIG_X86_MCELOG_LEGACY
 void mce_work_trigger(void)
 {
 	if (mce_helper[0])
@@ -113,6 +113,7 @@ static ssize_t set_trigger(struct device *s, struct device_attribute *attr,
 }
 
 DEVICE_ATTR(trigger, 0644, show_trigger, set_trigger);
+#endif
 
 /*
  * mce_chrdev: Character device /dev/mcelog to read and clear the MCE log.
@@ -276,6 +277,7 @@ static long mce_chrdev_ioctl(struct file *f, unsigned int cmd,
 	}
 }
 
+#ifdef CONFIG_X86_MCELOG_LEGACY
 void mce_register_injector_chain(struct notifier_block *nb)
 {
 	blocking_notifier_chain_register(&mce_injector_chain, nb);
@@ -287,6 +289,7 @@ void mce_unregister_injector_chain(struct notifier_block *nb)
 	blocking_notifier_chain_unregister(&mce_injector_chain, nb);
 }
 EXPORT_SYMBOL_GPL(mce_unregister_injector_chain);
+#endif
 
 static ssize_t mce_chrdev_write(struct file *filp, const char __user *ubuf,
 				size_t usize, loff_t *off)
-- 
1.8.3.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ