linux/kernel
Petr Mladek adc56dbfc4 printk/console: Allow to disable console output by using console="" or console=null
commit 3cffa06aeef7ece30f6b5ac0ea51f264e8fea4d0 upstream.

The commit 48021f9813 ("printk: handle blank console arguments
passed in.") prevented crash caused by empty console= parameter value.

Unfortunately, this value is widely used on Chromebooks to disable
the console output. The above commit caused performance regression
because the messages were pushed on slow console even though nobody
was watching it.

Use ttynull driver explicitly for console="" and console=null
parameters. It has been created for exactly this purpose.

It causes that preferred_console is set. As a result, ttySX and ttyX
are not used as a fallback. And only ttynull console gets registered by
default.

It still allows to register other consoles either by additional console=
parameters or SPCR. It prevents regression because it worked this way even
before. Also it is a sane semantic. Preventing output on all consoles
should be done another way, for example, by introducing mute_console
parameter.

Link: https://lore.kernel.org/r/20201006025935.GA597@jagdpanzerIV.localdomain
Suggested-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20201111135450.11214-3-pmladek@suse.com
Cc: Yi Fan <yfa@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-12 14:43:03 +01:00
..
bpf bpf: Fix integer overflow in prealloc_elems_and_freelist() 2021-10-13 10:08:18 +02:00
cgroup cgroup/cpuset: Fix a partition bug with hotplug 2021-09-15 09:47:32 +02:00
configs
debug
dma dma-debug: fix sg checks in debug_dma_map_sg() 2021-10-27 09:54:25 +02:00
events events: Reuse value read using READ_ONCE instead of re-reading it 2021-09-22 12:26:41 +02:00
gcov
irq genirq/timings: Fix error return code in irq_timings_test_irqs() 2021-09-15 09:47:29 +02:00
livepatch
locking locking/mutex: Fix HANDOFF condition 2021-09-15 09:47:25 +02:00
power PM: EM: Increase energy calculation precision 2021-09-15 09:47:33 +02:00
printk printk/console: Allow to disable console output by using console="" or console=null 2021-11-12 14:43:03 +01:00
rcu rcu/tree: Handle VM stoppage in stall detection 2021-09-15 09:47:26 +02:00
sched cpufreq: schedutil: Use kobject release() method to free sugov_tunables 2021-10-06 15:42:29 +02:00
time Revert "posix-cpu-timers: Force next expiration recalc after itimer reset" 2021-09-16 12:56:13 +02:00
trace tracing: Have all levels of checks prevent recursion 2021-10-27 09:54:29 +02:00
.gitignore
Kconfig.freezer
Kconfig.hz
Kconfig.locks
Kconfig.preempt
Makefile
acct.c
async.c
audit.c
audit.h
audit_fsnotify.c
audit_tree.c audit: move put_tree() to avoid trim_trees refcount underflow and UAF 2021-09-03 10:08:16 +02:00
audit_watch.c
auditfilter.c
auditsc.c audit: fix possible null-pointer dereference in audit_filter_rules 2021-10-27 09:54:27 +02:00
backtracetest.c
bounds.c
capability.c
compat.c
configs.c
context_tracking.c
cpu.c cpu/hotplug: Cure the cpusets trainwreck 2021-07-19 08:53:15 +02:00
cpu_pm.c
crash_core.c
crash_dump.c
cred.c
delayacct.c
dma.c
exec_domain.c
exit.c
extable.c
fail_function.c
fork.c mm/hugetlb: initialize hugetlb_usage in mm_init 2021-09-22 12:26:37 +02:00
freezer.c
futex.c mm, futex: fix shared futex pgoff on shmem huge page 2021-06-30 08:47:55 -04:00
gen_kheaders.sh
groups.c
hung_task.c
iomem.c
irq_work.c
jump_label.c
kallsyms.c
kcmp.c
kcov.c
kexec.c
kexec_core.c
kexec_elf.c
kexec_file.c kernel: kexec_file: fix error return code of kexec_calculate_store_digests() 2021-05-19 10:08:28 +02:00
kexec_internal.h
kheaders.c
kmod.c
kprobes.c
ksysfs.c
kthread.c kthread: Fix PF_KTHREAD vs to_kthread() race 2021-09-12 08:56:39 +02:00
latencytop.c
module-internal.h
module.c module: limit enabling module.sig_enforce 2021-06-30 08:47:42 -04:00
module_signature.c
module_signing.c
notifier.c
nsproxy.c
padata.c
panic.c
params.c
pid.c
pid_namespace.c memcg: enable accounting for pids in nested pid namespaces 2021-09-22 12:26:37 +02:00
profile.c profiling: fix shift-out-of-bounds bugs 2021-09-26 14:07:09 +02:00
ptrace.c ptrace: make ptrace() fail if the tracee changed its pid unexpectedly 2021-05-26 12:05:15 +02:00
range.c
reboot.c
relay.c
resource.c
rseq.c
seccomp.c
signal.c
smp.c
smpboot.c
smpboot.h
softirq.c
stackleak.c
stacktrace.c
stop_machine.c
sys.c prctl: allow to setup brk for et_dyn executables 2021-09-26 14:07:08 +02:00
sys_ni.c
sysctl-test.c
sysctl.c
sysctl_binary.c
task_work.c
taskstats.c
test_kprobes.c
torture.c
tracepoint.c tracepoint: Add tracepoint_probe_register_may_exist() for BPF tracing 2021-07-14 16:53:08 +02:00
tsacct.c
ucount.c
uid16.c
uid16.h
umh.c
up.c
user-return-notifier.c
user.c
user_namespace.c
utsname.c
utsname_sysctl.c
watchdog.c
watchdog_hld.c
workqueue.c workqueue: Fix possible memory leaks in wq_numa_init() 2021-09-22 12:26:30 +02:00
workqueue_internal.h