Skip to content
Commit c272612c authored by David Gow's avatar David Gow Committed by Shuah Khan
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: default avatarMaíra Canal <mairacanal@riseup.net>
Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
parent 2852ca7f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment