Skip to content

RFC printk: Official way to mute consoles

Petr Mladek lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest1 of 2 patches 13 repliesIn review

1 of 2 patches is in this archive. The cover letter announces 2.

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2printk: Add kernel parameter: mute_consoleDocumentation/admin-guide/kernel-parameters.txt kernel/printk/printk.c+26 -111 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC 0/2] printk: Official way to mute consoles

The long discussion about handling empty console= came up with several problems. This patchset tries to solve the two original problems with empty console="" parameter:

+ Prevent the potential crash by registering console for /dev/console.
+ Prevent the performance regression by muting the consoles.

IMHO, the patchset makes sense on its own. It fixes a regression. It seems that people want this functionality [1][2][3].

Note that there are still some problems that might be solved later:

+ Invalid console=bla name might still prevent registering any console.

+ The kernel should not crash even when /dev/console does not point to any real console.

+ Should we add some fallback for stdin, stdout, and stderr when /dev/console can't be opened? For example, /dev/null?

+ How user space handle missing none-console associated with /dev/console?

[1] https://www.programmersought.com/article/19374022450/
[2] https://developer.toradex.com/knowledge-base/how-to-disable-enable-debug-messages-in-linux
[3] https://unix.stackexchange.com/questions/117926/try-to-disable-console-output-console-null-doesnt-work

Petr Mladek (2):
printk: Add kernel parameter: mute_console
printk: Restore and document obsolete ways to disable console output

 .../admin-guide/kernel-parameters.txt         | 11 +++++++
 kernel/printk/printk.c                        | 30 +++++++++++++++++--
 2 files changed, 39 insertions(+), 2 deletions(-)
Signature · 1 line
2.26.2