1 // SPDX-License-Identifier: GPL-2.0-only
3 * This module emits "Hello, world" on printk when loaded.
5 * It is designed to be used for basic evaluation of the module loading
6 * subsystem (for example when validating module signing/verification). It
7 * lacks any extra dependencies, and will not normally be loaded by the
8 * system unless explicitly requested by name.
11 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
13 #include <linux/init.h>
14 #include <linux/module.h>
15 #include <linux/printk.h>
17 static int __init test_module_init(void)
19 pr_warn("Hello, world\n");
24 module_init(test_module_init);
26 static void __exit test_module_exit(void)
31 module_exit(test_module_exit);
33 MODULE_AUTHOR("Kees Cook <keescook@chromium.org>");
34 MODULE_LICENSE("GPL");