blob: 0bc30c437a4e6c89084db2f2c858d8158115ebd8 [file] [log] [blame]
From 94656c56d5704f1ce01262fbd96ebf1b15c11598 Mon Sep 17 00:00:00 2001
From: Guenter Roeck <groeck@chromium.org>
Date: Mon, 5 Oct 2020 07:40:02 -0700
Subject: [PATCH] CHROMIUM: Revert "printk: handle blank console arguments
passed in."
This reverts commit 48021f98130880dd74286459a1ef48b5e9bc374f and
commit 3cffa06aeef7ece30f6b5ac0ea51f264e8fea4d0.
The reverted patch "handles" blank "console=" command line parameters
by explicitly ignoring them. This is different to the previous behavior,
where such an argument disabled a default console (for example a
console specified via devicetree).
Chrome OS uses the empty "console=" kernel command line parameter in
production images to explicitly disable the default console. With the
reverted patch in place, this no longer works. This has severe performance
impacts, especially in systems where the console is on a serial interface.
There may be other undesirable side effects - on at least one platform,
it was observed that dm-verity no longer works with the reverted patch
in place, for unknown reasons.
BUG=chromium:1135157, b:172215283
TEST=Verify that console is disabled in production images, and that dm-verity works
Change-Id: I2c8d0d8c1ad9b93a6891292927f77e7616515511
Disallow-Recycled-Builds: test-failures
Signed-off-by: Guenter Roeck <groeck@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/2449896
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/2916548
---
kernel/printk/printk.c | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index 054c0e7784fdfdcb1b3f11a67ccd82289eec810a..daa8f9f669291aa7ebd2af1ef273ecc155ed6054 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -2504,16 +2504,6 @@ static int __init console_setup(char *str)
char *s;
int idx;
- /*
- * console="" or console=null have been suggested as a way to
- * disable console output. Use ttynull that has been created
- * for exactly this purpose.
- */
- if (str[0] == 0 || strcmp(str, "null") == 0) {
- __add_preferred_console("ttynull", 0, NULL, NULL, NULL, true);
- return 1;
- }
-
if (_braille_console_setup(&str, &brl_options))
return 1;
--
2.46.0.rc2.264.g509ed76dc8-goog