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: <5C4C569E8A4B9B42A84A977CF070A35B2C12D6E2FA@USINDEVS01.corp.hds.com>
Date:	Wed, 17 Nov 2010 10:00:37 -0500
From:	Seiji Aguchi <seiji.aguchi@....com>
To:	Andrew Morton <akpm@...ux-foundation.org>,
	"Artem.Bityutskiy@...ia.com" <Artem.Bityutskiy@...ia.com>,
	ext KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
	"simon.kagstrom@...insight.net" <simon.kagstrom@...insight.net>,
	"David.Woodhouse@...el.com" <David.Woodhouse@...el.com>,
	"anders.grafstrom@...insight.net" <anders.grafstrom@...insight.net>,
	"jason.wessel@...driver.com" <jason.wessel@...driver.com>,
	"jslaby@...e.cz" <jslaby@...e.cz>,
	"jmorris@...ei.org" <jmorris@...ei.org>,
	"eparis@...hat.com" <eparis@...hat.com>, "hch@....de" <hch@....de>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"kyungmin.park@...sung.com" <kyungmin.park@...sung.com>,
	"marco.stornelli@...il.com" <marco.stornelli@...il.com>,
	"namhyung@...il.com" <namhyung@...il.com>,
	Aaron Durbin <adurbin@...gle.com>,
	"randy.dunlap@...cle.com" <randy.dunlap@...cle.com>
CC:	"dle-develop@...ts.sourceforge.net" 
	<dle-develop@...ts.sourceforge.net>,
	Satoru Moriya <satoru.moriya@....com>,
	Seiji Aguchi <seiji.aguchi@....com>
Subject: [PATCH 1/2] kmsg_dump: adding to reboot, halt, poweroff and
 emergency_restart path

This patch alters mtdoops and ramoops to perform their actions only for KMSG_DUMP_PANIC,
KMSG_DUMP_OOPS and KMSG_DUMP_KEXEC because they would like to log crashes only.

 Signed-off-by: Seiji Aguchi <seiji.aguchi@....com>

---
 drivers/char/ramoops.c |    5 +++++
 drivers/mtd/mtdoops.c  |    5 +++++
 2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/drivers/char/ramoops.c b/drivers/char/ramoops.c index 73dcb0e..8998b29 100644
--- a/drivers/char/ramoops.c
+++ b/drivers/char/ramoops.c
@@ -69,6 +69,11 @@ static void ramoops_do_dump(struct kmsg_dumper *dumper,
 	char *buf;
 	struct timeval timestamp;
 
+	if (reason != KMSG_DUMP_OOPS &&
+	    reason != KMSG_DUMP_PANIC &&
+	    reason != KMSG_DUMP_KEXEC)
+		return;
+
 	/* Only dump oopses if dump_oops is set */
 	if (reason == KMSG_DUMP_OOPS && !dump_oops)
 		return;
diff --git a/drivers/mtd/mtdoops.c b/drivers/mtd/mtdoops.c index 1ee72f3..c948150 100644
--- a/drivers/mtd/mtdoops.c
+++ b/drivers/mtd/mtdoops.c
@@ -307,6 +307,11 @@ static void mtdoops_do_dump(struct kmsg_dumper *dumper,
 	unsigned long l1_cpy, l2_cpy;
 	char *dst;
 
+	if (reason != KMSG_DUMP_OOPS &&
+	    reason != KMSG_DUMP_PANIC &&
+	    reason != KMSG_DUMP_KEXEC)
+		return;
+
 	/* Only dump oopses if dump_oops is set */
 	if (reason == KMSG_DUMP_OOPS && !dump_oops)
 		return;
--
1.7.2.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ