Skip to content

printk/console: Use ttynull when no console is available or wanted

Petr Mladek buildroot linux-arch linux-snps-arc lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 22 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2init/console: Use ttynull as a fallback when there is no consoledrivers/tty/Kconfig drivers/tty/Makefile drivers/tty/ttynull.c +2 more+30 -1819 replies
2/2printk/console: Allow to disable console output by using console="" or console=nullkernel/printk/printk.c+8 -12 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchGreg Kroah-HartmanGuenter RoeckSergey Senozhatsky
1/2R-b Reviewed-and-tested-by A-b
2/2Reviewed-and-tested-by A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH 0/2] printk/console: Use ttynull when no console is available or wanted

This is another attempt to solve regression caused by the commit 48021f98130880dd74 ("printk: handle blank console arguments passed in.").

It prevented a crash caused by empty console= parameter. But it caused performance problems on Chromebooks because they use it to disable all consoles, see
see https://lore.kernel.org/r/[email protected]

Solve both problems by using ttynull console driver that was crated exactly for this purpose.

The 1st patch should prevent the crash for any invalid console name.

The 2nd patch allows to used the ttynull driver also with the widely used console= and console=null parameters.

Best Regards,
Petr

Petr Mladek (2):
init/console: Use ttynull as a fallback when there is no console printk/console: Allow to disable console output by using console="" or
console=null

 drivers/tty/Kconfig     | 14 --------------
 drivers/tty/Makefile    |  3 +--
 drivers/tty/ttynull.c   | 18 ++++++++++++++++++
 include/linux/console.h |  3 +++
 init/main.c             | 10 ++++++++--
 kernel/printk/printk.c  |  9 ++++++++-
 6 files changed, 38 insertions(+), 19 deletions(-)
Signature · 1 line
2.26.2