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]
Date:	Fri, 14 Sep 2012 16:42:17 +0930
From:	Rusty Russell <rusty@...tcorp.com.au>
To:	LKML <linux-kernel@...r.kernel.org>
Cc:	Lucas De Marchi <lucas.demarchi@...fusion.mobi>,
	Jon Masters <jonathan@...masters.org>
Subject: module: test code for waiting.

From: Rusty Russell <rusty@...tcorp.com.au>
Subject: module: dummy module to test loading race.
---
 kernel/Makefile   |    1 +
 kernel/test-mod.c |   21 +++++++++++++++++++++
 2 files changed, 22 insertions(+)

diff --git a/kernel/Makefile b/kernel/Makefile
--- a/kernel/Makefile
+++ b/kernel/Makefile
@@ -131,3 +131,4 @@ quiet_cmd_timeconst  = TIMEC   $@
 targets += timeconst.h
 $(obj)/timeconst.h: $(src)/timeconst.pl FORCE
 	$(call if_changed,timeconst)
+obj-m += test-mod.o
diff --git a/kernel/test-mod.c b/kernel/test-mod.c
new file mode 100644
--- /dev/null
+++ b/kernel/test-mod.c
@@ -0,0 +1,21 @@
+#include <linux/module.h>
+#include <linux/moduleparam.h>
+#include <linux/delay.h>
+
+static bool fail;
+module_param(fail, bool, 0644);
+
+int init(void)
+{
+	printk("Module %p init start...\n", THIS_MODULE);
+	ssleep(10);
+	printk("...%p init %s\n", THIS_MODULE, fail ? "fail" : "succeed");
+	return fail ? -EINVAL : 0;
+}
+
+void fini(void)
+{
+}
+
+module_init(init);
+module_exit(fini);
--
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