diff options
author | Aaron Tomlin <atomlin@redhat.com> | 2022-05-02 22:52:52 +0200 |
---|---|---|
committer | Luis Chamberlain <mcgrof@kernel.org> | 2022-05-12 19:29:41 +0200 |
commit | 99bd9956551b27cb6f5b445abaced7e13b9976cd (patch) | |
tree | cba54839c4a7c86927516142556a5335b5375400 /init | |
parent | module: Move module_assert_mutex_or_preempt() to internal.h (diff) | |
download | linux-99bd9956551b27cb6f5b445abaced7e13b9976cd.tar.xz linux-99bd9956551b27cb6f5b445abaced7e13b9976cd.zip |
module: Introduce module unload taint tracking
Currently, only the initial module that tainted the kernel is
recorded e.g. when an out-of-tree module is loaded.
The purpose of this patch is to allow the kernel to maintain a record of
each unloaded module that taints the kernel. So, in addition to
displaying a list of linked modules (see print_modules()) e.g. in the
event of a detected bad page, unloaded modules that carried a taint/or
taints are displayed too. A tainted module unload count is maintained.
The number of tracked modules is not fixed. This feature is disabled by
default.
Signed-off-by: Aaron Tomlin <atomlin@redhat.com>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Diffstat (limited to 'init')
-rw-r--r-- | init/Kconfig | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/init/Kconfig b/init/Kconfig index ddcbefe535e9..6b30210f787d 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -2118,6 +2118,17 @@ config MODULE_FORCE_UNLOAD rmmod). This is mainly for kernel developers and desperate users. If unsure, say N. +config MODULE_UNLOAD_TAINT_TRACKING + bool "Tainted module unload tracking" + depends on MODULE_UNLOAD + default n + help + This option allows you to maintain a record of each unloaded + module that tainted the kernel. In addition to displaying a + list of linked (or loaded) modules e.g. on detection of a bad + page (see bad_page()), the aforementioned details are also + shown. If unsure, say N. + config MODVERSIONS bool "Module versioning support" help |