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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120905103237.9726.56131.stgit@localhost.localdomain>
Date:	Wed, 05 Sep 2012 16:02:37 +0530
From:	"Naveen N. Rao" <naveen.n.rao@...ux.vnet.ibm.com>
To:	ak@...ux.intel.com, tony.luck@...el.com, andi@...stfloor.org,
	bp@...64.org
Cc:	x86@...nel.org, linux-kernel@...r.kernel.org,
	linux-edac@...r.kernel.org, ananth@...ibm.com
Subject: [PATCH] [mcelog] Start using the new sysfs tunables location

All the current mce tunables are now available under
/sys/devices/system/machinecheck. Start using this new location, but fall back
to the older per-cpu location so that we continue working with older kernels.

Signed-off-by: Naveen N. Rao <naveen.n.rao@...ux.vnet.ibm.com>
---
 README      |    2 +-
 mcelog.init |    5 ++++-
 tests/test  |    7 ++++++-
 3 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/README b/README
index 08184ed..0426460 100644
--- a/README
+++ b/README
@@ -18,7 +18,7 @@ significantly (upto 10 minutes) and does not allow mcelog to keep extended state
 
 trigger is a newer method where the kernel runs mcelog on a error.
 This is configured with 
-echo /usr/sbin/mcelog > /sys/devices/system/machinecheck/machinecheck0/trigger
+echo /usr/sbin/mcelog > /sys/devices/system/machinecheck/trigger
 This is faster, but still doesn't allow mcelog to keep state,
 and has relatively high overhead for each error because a program has
 to be initialized from scratch.
diff --git a/mcelog.init b/mcelog.init
index 0abe786..5f32ba7 100755
--- a/mcelog.init
+++ b/mcelog.init
@@ -31,7 +31,10 @@ MCELOG_OPTIONS=""
 
 # private settings
 MCELOG=${MCELOG:-/usr/sbin/mcelog}
-TRIGGER=/sys/devices/system/machinecheck/machinecheck0/trigger
+TRIGGER=/sys/devices/system/machinecheck/trigger
+if [ ! -e $TRIGGER ] ; then
+	TRIGGER=/sys/devices/system/machinecheck/machinecheck0/trigger
+fi
 [ ! -x $MCELOG ] && ( echo "mcelog not found" ; exit 1 )
 [ ! -r /dev/mcelog ] && ( echo "/dev/mcelog not active" ; exit 0 )
 
diff --git a/tests/test b/tests/test
index c673eb2..52daf01 100755
--- a/tests/test
+++ b/tests/test
@@ -17,10 +17,15 @@ if [ "$(whoami)" != "root" ] ; then
 	exit 1
 fi
 
+TRIGGER=/sys/devices/system/machinecheck/trigger
+if [ ! -e $TRIGGER ] ; then
+	TRIGGER=/sys/devices/system/machinecheck/machinecheck0/trigger
+fi
+
 echo "++++++++++++ running $1 test +++++++++++++++++++"
 
 # disable trigger
-echo -n "" > /sys/devices/system/machinecheck/machinecheck0/trigger
+echo -n "" > $TRIGGER
 killall mcelog || true
 
 #killwatchdog() { 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ