[Crash-utility] [PATCH 3/3] kernel: show that the kernel is tainted at init-time

Aaron Tomlin atomlin at redhat.com
Mon Nov 1 11:39:34 UTC 2021


Explicitly indicate to the user that the Linux kernel is tainted
at init-time or when the 'sys' command is used.

Signed-off-by: Aaron Tomlin <atomlin at redhat.com>
---
 kernel.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/kernel.c b/kernel.c
index 553849c..d98c37e 100644
--- a/kernel.c
+++ b/kernel.c
@@ -5563,16 +5563,18 @@ display_sys_stats(void)
 		}
 	} else {
         	if (pc->system_map) {
-                	fprintf(fp, "  SYSTEM MAP: %s%s\n", pc->system_map,
-				is_livepatch() ? "  [LIVEPATCH]" : "");
+                	fprintf(fp, "  SYSTEM MAP: %s%s%s\n", pc->system_map,
+				is_livepatch() ? "  [LIVEPATCH]" : "",
+				is_kernel_tainted() ? "  [TAINTED]" : "");
 			fprintf(fp, "DEBUG KERNEL: %s %s\n", 
 					pc->namelist_orig ?
 					pc->namelist_orig : pc->namelist,
 					debug_kernel_version(pc->namelist));
 		} else
-			fprintf(fp, "      KERNEL: %s%s\n", pc->namelist_orig ? 
+			fprintf(fp, "      KERNEL: %s%s%s\n", pc->namelist_orig ? 
 				pc->namelist_orig : pc->namelist,
-				is_livepatch() ? "  [LIVEPATCH]" : "");
+				is_livepatch() ? "  [LIVEPATCH]" : "",
+				is_kernel_tainted() ? "  [TAINTED]" : "");
 	}
 
 	if (pc->debuginfo_file) { 
-- 
2.31.1




More information about the Crash-utility mailing list