Skip to content

Commit 4efb442

Browse files
suryasaimadhutorvalds
authored andcommitted
kernel/panic.c: add TAINT_AUX
This is the gist of a patch which we've been forward-porting in our kernels for a long time now and it probably would make a good sense to have such TAINT_AUX flag upstream which can be used by each distro etc, how they see fit. This way, we won't need to forward-port a distro-only version indefinitely. Add an auxiliary taint flag to be used by distros and others. This obviates the need to forward-port whatever internal solutions people have in favor of a single flag which they can map arbitrarily to a definition of their pleasing. The "X" mnemonic could also mean eXternal, which would be taint from a distro or something else but not the upstream kernel. We will use it to mark modules for which we don't provide support. I.e., a really eXternal module. Link: http://lkml.kernel.org/r/20170911134533.dp5mtyku5bongx4c@pd.tnic Signed-off-by: Borislav Petkov <bp@suse.de> Cc: Kees Cook <keescook@chromium.org> Cc: Jessica Yu <jeyu@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Jiri Slaby <jslaby@suse.cz> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Michal Marek <mmarek@suse.cz> Cc: Jiri Kosina <jkosina@suse.cz> Cc: Takashi Iwai <tiwai@suse.de> Cc: Petr Mladek <pmladek@suse.com> Cc: Jeff Mahoney <jeffm@suse.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent e8cfbc2 commit 4efb442

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

‎include/linux/kernel.h‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,8 @@ extern enum system_states {
549549
#define TAINT_UNSIGNED_MODULE 13
550550
#define TAINT_SOFTLOCKUP 14
551551
#define TAINT_LIVEPATCH 15
552-
#define TAINT_FLAGS_COUNT 16
552+
#define TAINT_AUX 16
553+
#define TAINT_FLAGS_COUNT 17
553554

554555
struct taint_flag {
555556
char c_true; /* character printed when tainted */

‎kernel/panic.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,7 @@ const struct taint_flag taint_flags[TAINT_FLAGS_COUNT] = {
324324
{ 'E', ' ', true }, /* TAINT_UNSIGNED_MODULE */
325325
{ 'L', ' ', false }, /* TAINT_SOFTLOCKUP */
326326
{ 'K', ' ', true }, /* TAINT_LIVEPATCH */
327+
{ 'X', ' ', true }, /* TAINT_AUX */
327328
};
328329

329330
/**
@@ -345,6 +346,7 @@ const struct taint_flag taint_flags[TAINT_FLAGS_COUNT] = {
345346
* 'E' - Unsigned module has been loaded.
346347
* 'L' - A soft lockup has previously occurred.
347348
* 'K' - Kernel has been live patched.
349+
* 'X' - Auxiliary taint, for distros' use.
348350
*
349351
* The string is overwritten by the next call to print_tainted().
350352
*/

0 commit comments

Comments
 (0)