aboutsummaryrefslogtreecommitdiffstats
path: root/lib/test_module.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2014-02-07 14:27:30 -0500
committerH. Peter Anvin <hpa@linux.intel.com>2014-02-07 14:27:30 -0500
commita3b072cd180c12e8fe0ece9487b9065808327640 (patch)
tree62b982041be84748852d77cdf6ca5639ef40858f /lib/test_module.c
parent75a1ba5b2c529db60ca49626bcaf0bddf4548438 (diff)
parent081cd62a010f97b5bc1d2b0cd123c5abc692b68a (diff)
Merge tag 'efi-urgent' into x86/urgent
* Avoid WARN_ON() when mapping BGRT on Baytrail (EFI 32-bit). Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'lib/test_module.c')
-rw-r--r--lib/test_module.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/lib/test_module.c b/lib/test_module.c
new file mode 100644
index 000000000000..319b66f1ff61
--- /dev/null
+++ b/lib/test_module.c
@@ -0,0 +1,33 @@
1/*
2 * This module emits "Hello, world" on printk when loaded.
3 *
4 * It is designed to be used for basic evaluation of the module loading
5 * subsystem (for example when validating module signing/verification). It
6 * lacks any extra dependencies, and will not normally be loaded by the
7 * system unless explicitly requested by name.
8 */
9
10#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
11
12#include <linux/init.h>
13#include <linux/module.h>
14#include <linux/printk.h>
15
16static int __init test_module_init(void)
17{
18 pr_warn("Hello, world\n");
19
20 return 0;
21}
22
23module_init(test_module_init);
24
25static void __exit test_module_exit(void)
26{
27 pr_warn("Goodbye\n");
28}
29
30module_exit(test_module_exit);
31
32MODULE_AUTHOR("Kees Cook <keescook@chromium.org>");
33MODULE_LICENSE("GPL");