kernel/lib/test_module.c
sevki c9e1dba412 chore(ci): setup github actions and workflows
setup CI/CD for kernel development
- added CodeQL for code scanning
- every pr is built as an image and is available for
  30days on https://oklinux.dev
- tagged and released on github for now

Signed-off-by: sevki <s@sevki.io>
2024-03-15 21:46:24 +00:00

34 lines
794 B
C

// SPDX-License-Identifier: GPL-2.0-only
/*
* 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;
}
module_init(test_module_init);
static void __exit test_module_exit(void)
{
pr_warn("Goodbye\n");
}
module_exit(test_module_exit);
MODULE_AUTHOR("Kees Cook <keescook@chromium.org>");
MODULE_LICENSE("GPL");