|
|
a60cd7 |
From 80087d0d88e2ff5a3c644f939bbe602a064096c4 Mon Sep 17 00:00:00 2001
|
|
|
a60cd7 |
From: Julius Milan <jmilan@redhat.com>
|
|
|
a60cd7 |
Date: Tue, 26 Sep 2017 15:56:42 +0200
|
|
|
a60cd7 |
Subject: [PATCH] koops: Improve not-reportable for oopses with taint flags
|
|
|
a60cd7 |
|
|
|
a60cd7 |
Adds detailed info about taint flags to not-reportable. This
|
|
|
a60cd7 |
additional info contains description of every taint flag that appeared
|
|
|
a60cd7 |
in particular oops.
|
|
|
a60cd7 |
It is either good for user information and also solves the problem when users
|
|
|
a60cd7 |
opened bugs on abrt from misunderstanding tainted flags.
|
|
|
a60cd7 |
|
|
|
a60cd7 |
Related to rhbz#1452160
|
|
|
a60cd7 |
---
|
|
|
a60cd7 |
src/lib/kernel.c | 7 ++++---
|
|
|
a60cd7 |
src/plugins/abrt-dump-oops.c | 8 ++++----
|
|
|
a60cd7 |
2 files changed, 8 insertions(+), 7 deletions(-)
|
|
|
a60cd7 |
|
|
|
a60cd7 |
diff --git a/src/lib/kernel.c b/src/lib/kernel.c
|
|
|
a60cd7 |
index 3c8cbdf..346b0a6 100644
|
|
|
a60cd7 |
--- a/src/lib/kernel.c
|
|
|
a60cd7 |
+++ b/src/lib/kernel.c
|
|
|
a60cd7 |
@@ -695,9 +695,10 @@ static const char *const tnts_long[] = {
|
|
|
a60cd7 |
/* B */ "System has hit bad_page.",
|
|
|
a60cd7 |
/* C */ "Modules from drivers/staging are loaded.",
|
|
|
a60cd7 |
/* D */ "Kernel has oopsed before",
|
|
|
a60cd7 |
- /* E */ NULL,
|
|
|
a60cd7 |
+ /* E */ "Unsigned module has been loaded.",
|
|
|
a60cd7 |
/* F */ "Module has been forcibly loaded.",
|
|
|
a60cd7 |
- /* G */ "Proprietary module has not been loaded.",
|
|
|
a60cd7 |
+ /* We don't want to be more descriptive about G flag */
|
|
|
a60cd7 |
+ /* G */ NULL, /* "Proprietary module has not been loaded." */
|
|
|
a60cd7 |
/* H */ NULL,
|
|
|
a60cd7 |
/* I */ "Working around severe firmware bug.",
|
|
|
a60cd7 |
/* J */ NULL,
|
|
|
a60cd7 |
@@ -729,7 +730,7 @@ char *kernel_tainted_long(const char *tainted_short)
|
|
|
a60cd7 |
{
|
|
|
a60cd7 |
const char *const txt = tnts_long[tnt_index];
|
|
|
a60cd7 |
if (txt)
|
|
|
a60cd7 |
- strbuf_append_strf(tnt_long, "%s\n", txt);
|
|
|
a60cd7 |
+ strbuf_append_strf(tnt_long, "%c - %s\n", tainted_short[0], txt);
|
|
|
a60cd7 |
}
|
|
|
a60cd7 |
|
|
|
a60cd7 |
++tainted_short;
|
|
|
a60cd7 |
diff --git a/src/plugins/abrt-dump-oops.c b/src/plugins/abrt-dump-oops.c
|
|
|
a60cd7 |
index 05cb728..e7db19a 100644
|
|
|
a60cd7 |
--- a/src/plugins/abrt-dump-oops.c
|
|
|
a60cd7 |
+++ b/src/plugins/abrt-dump-oops.c
|
|
|
a60cd7 |
@@ -139,13 +139,12 @@ static void save_oops_data_in_dump_dir(struct dump_dir *dd, char *oops, const ch
|
|
|
a60cd7 |
|
|
|
a60cd7 |
char *tnt_long = kernel_tainted_long(tainted_short);
|
|
|
a60cd7 |
dd_save_text(dd, FILENAME_TAINTED_LONG, tnt_long);
|
|
|
a60cd7 |
- free(tnt_long);
|
|
|
a60cd7 |
|
|
|
a60cd7 |
struct strbuf *reason = strbuf_new();
|
|
|
a60cd7 |
const char *fmt = _("A kernel problem occurred, but your kernel has been "
|
|
|
a60cd7 |
- "tainted (flags:%s). Kernel maintainers are unable to "
|
|
|
a60cd7 |
- "diagnose tainted reports.");
|
|
|
a60cd7 |
- strbuf_append_strf(reason, fmt, tainted_short);
|
|
|
a60cd7 |
+ "tainted (flags:%s). Explanation:\n%s"
|
|
|
a60cd7 |
+ "Kernel maintainers are unable to diagnose tainted reports.");
|
|
|
a60cd7 |
+ strbuf_append_strf(reason, fmt, tainted_short, tnt_long);
|
|
|
a60cd7 |
|
|
|
a60cd7 |
char *modlist = !proc_modules ? NULL : list_of_tainted_modules(proc_modules);
|
|
|
a60cd7 |
if (modlist)
|
|
|
a60cd7 |
@@ -157,6 +156,7 @@ static void save_oops_data_in_dump_dir(struct dump_dir *dd, char *oops, const ch
|
|
|
a60cd7 |
dd_save_text(dd, FILENAME_NOT_REPORTABLE, reason->buf);
|
|
|
a60cd7 |
strbuf_free(reason);
|
|
|
a60cd7 |
free(tainted_short);
|
|
|
a60cd7 |
+ free(tnt_long);
|
|
|
a60cd7 |
}
|
|
|
a60cd7 |
}
|
|
|
a60cd7 |
|
|
|
a60cd7 |
--
|
|
|
a60cd7 |
1.8.3.1
|
|
|
a60cd7 |
|