Files
rockchip-kernel/kernel/test_module.c
Sonny Rao 3bce942336 CHROMIUM: add test_module module
Create a module for simple module loading tests.

BUG=chromium-os:37353
TEST=daisy build, security_ModuleLocking passes when using "test_module"

Change-Id: I7ac604b614d69c2f18266a2241a660629b418701
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39918
Reviewed-by: Grant Grundler <grundler@chromium.org>
Tested-by: Grant Grundler <grundler@chromium.org>
2014-05-02 18:50:11 -07:00

27 lines
402 B
C

/*
* "hello world" kernel module
*/
#define pr_fmt(fmt) "test_module: " fmt
#include <linux/module.h>
static int __init test_module_init(void)
{
pr_info("Hello, world\n");
return 0;
}
module_init(test_module_init);
static void __exit test_module_exit(void)
{
pr_info("Goodbye\n");
}
module_exit(test_module_exit);
MODULE_AUTHOR("Kees Cook <keescook@chromium.org>");
MODULE_LICENSE("GPL");