# Linux Kernel Module Cheat

#### 17.7.2. procfs

Procfs is just another fops entry point:

    ./procfs.sh
    echo $?

Outcome: the test passes:

    0

Procfs is a little less convenient than debugfs, but is more used in serious applications.

Procfs can run all system calls, including ones that debugfs can’t, e.g. mmap.

Sources:

- kernel_modules/procfs.c

- rootfs_overlay/lkmc/procfs.sh

Bibliography:

- https://superuser.com/questions/619955/how-does-proc-work/1442571#1442571

- https://stackoverflow.com/questions/8516021/proc-create-example-for-kernel-module/18924359#18924359

- /proc/version