Update README.md

This commit is contained in:
djmil 2024-06-23 23:01:13 +02:00
parent 02efdca8d0
commit 08c8074769

View File

@ -1,4 +1,3 @@
Kernel module [compilation](https://www.kernel.org/doc/html/v5.6/kbuild/modules.html) *depends* on kernel headers. This is a [deliberate design choice](https://github.com/torvalds/linux/blob/v4.9/Documentation/stable_api_nonsense.txt) made by kernel developers. As result, there is no even a slight guarantee of an ABI compatibility even between minor kernel versions. Kernel module [compilation](https://www.kernel.org/doc/html/v5.6/kbuild/modules.html) *depends* on kernel headers. This is a [deliberate design choice](https://github.com/torvalds/linux/blob/v4.9/Documentation/stable_api_nonsense.txt) made by kernel developers. As result, there is no even a slight guarantee of an ABI compatibility even between minor kernel versions.
> But what to do if, for the variety of reasons, for the kernel you are interest in, headers are unavailable? > But what to do if, for the variety of reasons, for the kernel you are interest in, headers are unavailable?
@ -149,23 +148,13 @@ In order for module to use any externally declared symbol module must:
# Misc commands # Misc commands
* Module loading ```shell
```bash insmod module_name.ko # Module loading
insmod module_name.ko
```
* List loaded modules rmmod MODULE_NAME # Module unload
```bash # MODULE_NAME can be found in `.gnu.linkonce.this_module` section
lsmod
```
* Logs lsmod # List loaded modules
```bash
dmesg | grep insmod
```
* Module unloading dmesg | grep insmod # See logs
```bash
rmmod MODULE_NAME # from .gnu.linkonce.this_module section
``` ```