cregit-Linux how code gets into the kernel

Release 4.13 lib/test_module.c

Directory: lib
/*
 * This module emits "Hello, world" on printk when loaded.
 *
 * It is designed to be used for basic evaluation of the module loading
 * subsystem (for example when validating module signing/verification). It
 * lacks any extra dependencies, and will not normally be loaded by the
 * system unless explicitly requested by name.
 */


#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

#include <linux/init.h>
#include <linux/module.h>
#include <linux/printk.h>


static int __init test_module_init(void) { pr_warn("Hello, world\n"); return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Kees Cook17100.00%1100.00%
Total17100.00%1100.00%

module_init(test_module_init);
static void __exit test_module_exit(void) { pr_warn("Goodbye\n"); }

Contributors

PersonTokensPropCommitsCommitProp
Kees Cook14100.00%1100.00%
Total14100.00%1100.00%

module_exit(test_module_exit); MODULE_AUTHOR("Kees Cook <keescook@chromium.org>"); MODULE_LICENSE("GPL");

Overall Contributors

PersonTokensPropCommitsCommitProp
Kees Cook68100.00%1100.00%
Total68100.00%1100.00%
Directory: lib
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.