• Home
  • Raw
  • Download

Lines Matching +full:use +full:- +full:kernel

1 // SPDX-License-Identifier: GPL-2.0-or-later
23 * tst_res(TFAIL, "kernel has issues");
25 * tst_res(TPASS, "kernel seems to be fine");
30 * The above code checks whether the kernel issued a warning (TST_TAINT_W)
33 * triggered a kernel bug.
35 * You do not need to use tst_taint_check() explicitly because it'll be called
37 * tst_test.taint_check in non-zero.
44 * This are all 17 flags that are present in kernel 4.15
45 * see kernel/panic.c in kernel sources
47 * Not all of them are valid in all kernel versions.
49 #define TST_TAINT_G (1 << 0) /* a module with non-GPL license loaded */
50 #define TST_TAINT_F (1 << 1) /* a module was force-loaded */
51 #define TST_TAINT_S (1 << 2) /* SMP with Non-SMP kernel */
54 #define TST_TAINT_B (1 << 5) /* page-release function found bad page */
56 #define TST_TAINT_D (1 << 7) /* kernel died recently - OOPS or BUG */
58 #define TST_TAINT_W (1 << 9) /* a warning has been issued by kernel */
63 #define TST_TAINT_L (1 << 14) /* A soft lock-up has previously occurred */
64 #define TST_TAINT_K (1 << 15) /* kernel has been live-patched */
65 #define TST_TAINT_X (1 << 16) /* auxiliary taint, for distro's use */
66 #define TST_TAINT_T (1 << 17) /* kernel was built with the struct randomization plugin */
69 * Initialize and prepare support for checking tainted kernel. Called
71 * is non-zero. The value of tst_test.taint_check will be passed as the mask
74 * supply the mask of TAINT-flags you want to check, for example
75 * (TST_TAINT_W | TST_TAINT_D) when you want to check if the kernel issued
79 * locally running kernel. In case the tainted-flags are already set by
80 * the kernel, there is no reason to continue and TBROK is generated.
93 * returns 0 or a bitmask of the flags that currently tainted the kernel.