Read/write files within a Linux kernel module
You should be aware that you should avoid file I/O from within Linux kernel when possible. The main idea is to go “one level deeper” and call VFS level functions instead of the syscall handler directly: Includes: #include <linux/fs.h> #include <asm/segment.h> #include <asm/uaccess.h> #include <linux/buffer_head.h> Opening a file (similar to open): struct file *file_open(const char … Read more