1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 02:37:36 +00:00

Kernel+Userland: Remove loadable kernel moduless

These interfaces are broken for about 9 months, maybe longer than that.
At this point, this is just a dead code nobody tests or tries to use, so
let's remove it instead of keeping a stale code just for the sake of
keeping it and hoping someone will fix it.

To better justify this, I read that OpenBSD removed loadable kernel
modules in 5.7 release (2014), mainly for the same reason we do -
nobody used it so they had no good reason to maintain it.
Still, OpenBSD had LKMs being effectively working, which is not the
current state in our project for a long time.
An arguably better approach to minimize the Kernel image size is to
allow dropping drivers and features while compiling a new image.
This commit is contained in:
Liav A 2021-09-11 15:57:41 +03:00 committed by Andreas Kling
parent b92871f7ef
commit 04ba31b8c5
19 changed files with 0 additions and 530 deletions

View file

@ -1,35 +0,0 @@
## Name
module\_load - load a kernel module
## Synopsis
```**c++
#include <serenity.h>
int module_load(const char* path, size_t path_length);
```
## Description
`module_load()` will load a kernel module from an ELF object file given its
path in the filesystem.
## Return value
If the module is successfully loaded, `module_load()` returns 0. Otherwise, it
returns -1 and sets `errno` to describe the error.
## Errors
* `EPERM`: The calling process does not have superuser permissions.
* `EFAULT`: `path` pointed to memory that was not accessible for the caller.
* `ENOEXEC`: The specified file could not be parsed as an ELF object.
* `EINVAL`: One or more symbols referred to by the module could not be resolved, or the module had no `.text` section, or didn't export a `module_init` function.
* `EEXIST`: A module with the same name was already loaded.
## See also
* [`module_unload`(2)](module_unload.md)
* [`modload`(8)](../man8/modload.md)
* [`kernel_modules`(7)](../man7/kernel_modules.md)

View file

@ -1,32 +0,0 @@
## Name
module\_unload - unload a kernel module
## Synopsis
```**c++
#include <serenity.h>
int module_unload(const char* name, size_t name_length);
```
## Description
`module_unload()` will unload a kernel module by name.
## Return value
If the module is successfully unloaded, `module_unload()` returns 0.
Otherwise, it returns -1 and sets `errno` to describe the error.
## Errors
* `EPERM`: The calling process does not have superuser permissions.
* `EFAULT`: `path` pointed to memory that was not accessible for the caller.
* `ENOENT`: There was no module loaded with the specified name.
## See also
* [`module_load`(2)](module_load.md)
* [`modunload`(8)](../man8/modunload.md)
* [`kernel_modules`(7)](../man7/kernel_modules.md)