Commit 59f9072f authored by Frank Rowand's avatar Frank Rowand Committed by Rob Herring

of: unittest: taint the kernel when of unittest runs

Make OF unittest trigger the new TAINT_TEST taint when OF unittest runs.
Due to OF unittest 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 OF unittest runs.
Signed-off-by: default avatarFrank Rowand <frank.rowand@sony.com>
Link: https://lore.kernel.org/r/20220823200152.3465751-1-frowand.list@gmail.comSigned-off-by: default avatarRob Herring <robh@kernel.org>
parent f1bd8b2e
......@@ -3467,6 +3467,9 @@ static int __init of_unittest(void)
pr_info("start of unittest - you will see error messages\n");
/* Taint the kernel so we know we've run tests. */
add_taint(TAINT_TEST, LOCKDEP_STILL_OK);
/* adding data for unittest */
if (IS_ENABLED(CONFIG_UML))
......
Markdown is supported
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