Skip to content
Snippets Groups Projects
Commit cd8c46e1 authored by David Gow's avatar David Gow Committed by Tales Aparecida
Browse files

kunit: Taint the kernel when KUnit tests are run


Make KUnit trigger the new TAINT_TEST taint when any KUnit test is run.
Due to KUnit tests not being intended to run on production systems, and
potentially causing problems (or security issues like leaking kernel
addresses), the kernel's state should not be considered safe for
production use after KUnit tests are run.

This both marks KUnit modules as test modules using MODULE_INFO() and
manually taints the kernel when tests are run (which catches builtin
tests).

Acked-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
Tested-by: default avatarDaniel Latypov <dlatypov@google.com>
Reviewed-by: default avatarBrendan Higgins <brendanhiggins@google.com>
Signed-off-by: default avatarDavid Gow <davidgow@google.com>
Tested-by: Maíra Canal's avatarMaíra Canal <mairacanal@riseup.net>
Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
parent c5a5d03b
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment