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: <20101007030807.GA4076@redhat.com>
Date:	Wed, 6 Oct 2010 23:08:07 -0400
From:	Don Zickus <dzickus@...hat.com>
To:	mingo@...e.hu, fweisbec@...il.com, andi@...stfloor.org
Cc:	robert.richter@....com, gorcunov@...il.com,
	linux-kernel@...r.kernel.org
Subject: [RFC] arch generic way to trigger unknown NMIs

Hi,

I was trying to put some automation test scripts together and was looking
for an arch neutral way to generate an unknown NMI.  I know some arches
do not support NMI.  Any way I wanted to add the code to the lkdtm module,
so I could more easily generate unknown NMIs  without hacking up the code.

For x86, I have been using:


diff --git a/drivers/misc/lkdtm.c b/drivers/misc/lkdtm.c
index ef34de7..c685242 100644
--- a/drivers/misc/lkdtm.c
+++ b/drivers/misc/lkdtm.c
@@ -43,6 +43,7 @@
 #include <linux/slab.h>
 #include <scsi/scsi_cmnd.h>
 #include <linux/debugfs.h>
+#include <asm/apic.h>
 
 #ifdef CONFIG_IDE
 #include <linux/ide.h>
@@ -78,6 +79,7 @@ enum ctype {
 	SOFTLOCKUP,
 	HARDLOCKUP,
 	HUNG_TASK,
+	NMI,
 };
 
 static char* cp_name[] = {
@@ -105,6 +107,7 @@ static char* cp_type[] = {
 	"SOFTLOCKUP",
 	"HARDLOCKUP",
 	"HUNG_TASK",
+	"NMI",
 };
 
 static struct jprobe lkdtm;
@@ -340,6 +343,9 @@ static void lkdtm_do_action(enum ctype which)
 		set_current_state(TASK_UNINTERRUPTIBLE);
 		schedule();
 		break;
+	case NMI:
+		apic->send_IPI_allbutself(NMI_VECTOR);
+		break;
 	case NONE:
 	default:
 		break;

Anyone have any thoughts?  Maybe there is an easier way?

Thanks,
Don
--
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