A
A
Alex Serov2016-11-16 00:58:19
linux
Alex Serov, 2016-11-16 00:58:19

How to work with text files in Linux in kernel mode?

Is it possible to work with text files in Linux Kernel Mode using some fprintf/fscanf analogues?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
PrAw, 2016-11-16
@gibsonman01

Google "linux open file in kernel mode" was fast enough...
https://www.howtoforge.com/reading-files-from-the-...
#include <linux/fs.h> // Needed by filp

T
TyzhSysAdmin, 2016-11-16
@POS_troi


How to use Kernel Mode Linux
To enable Kernel Mode Linux, say Y in Kernel Mode Linux field of kernel configuration, build and install the kernel, and reboot. Then, all executables under directory /trusted are executed in kernel mode in current Kernel Mode Linux implementation. For example, to execute a program named "cat" in kernel mode, copy the program to directory /trusted and execute it as follows (if the /trusted directory does not exist, mkdir it first):
% /trusted/cat

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question