diff options
author | Borislav Petkov <bp@suse.de> | 2014-06-04 19:11:46 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-04 19:54:17 -0400 |
commit | a8fe19ebfbfd90ec17c02284717238b02efb9580 (patch) | |
tree | b0bcae3df8f0f739993ede45c81c031d32d5edcd /kernel/printk | |
parent | 84b5ec8a9df86f3dcaaaf912715db35e4852d1da (diff) |
kernel/printk: use symbolic defines for console loglevels
... instead of naked numbers.
Stuff in sysrq.c used to set it to 8 which is supposed to mean above
default level so set it to DEBUG instead as we're terminating/killing all
tasks and we want to be verbose there.
Also, correct the check in x86_64_start_kernel which should be >= as
we're clearly issuing the string there for all debug levels, not only
the magical 10.
Signed-off-by: Borislav Petkov <bp@suse.de>
Acked-by: Kees Cook <keescook@chromium.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Joe Perches <joe@perches.com>
Cc: Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/printk')
-rw-r--r-- | kernel/printk/printk.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index 923c5d4e4202..ea2d5f6962ed 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c | |||
@@ -54,18 +54,11 @@ | |||
54 | #include "console_cmdline.h" | 54 | #include "console_cmdline.h" |
55 | #include "braille.h" | 55 | #include "braille.h" |
56 | 56 | ||
57 | /* printk's without a loglevel use this.. */ | ||
58 | #define DEFAULT_MESSAGE_LOGLEVEL CONFIG_DEFAULT_MESSAGE_LOGLEVEL | ||
59 | |||
60 | /* We show everything that is MORE important than this.. */ | ||
61 | #define MINIMUM_CONSOLE_LOGLEVEL 1 /* Minimum loglevel we let people use */ | ||
62 | #define DEFAULT_CONSOLE_LOGLEVEL 7 /* anything MORE serious than KERN_DEBUG */ | ||
63 | |||
64 | int console_printk[4] = { | 57 | int console_printk[4] = { |
65 | DEFAULT_CONSOLE_LOGLEVEL, /* console_loglevel */ | 58 | CONSOLE_LOGLEVEL_DEFAULT, /* console_loglevel */ |
66 | DEFAULT_MESSAGE_LOGLEVEL, /* default_message_loglevel */ | 59 | DEFAULT_MESSAGE_LOGLEVEL, /* default_message_loglevel */ |
67 | MINIMUM_CONSOLE_LOGLEVEL, /* minimum_console_loglevel */ | 60 | CONSOLE_LOGLEVEL_MIN, /* minimum_console_loglevel */ |
68 | DEFAULT_CONSOLE_LOGLEVEL, /* default_console_loglevel */ | 61 | CONSOLE_LOGLEVEL_DEFAULT, /* default_console_loglevel */ |
69 | }; | 62 | }; |
70 | 63 | ||
71 | /* Deferred messaged from sched code are marked by this special level */ | 64 | /* Deferred messaged from sched code are marked by this special level */ |