Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp372175pxb; Wed, 11 Nov 2020 06:00:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJyONL5WfmZMDVTlH/eW7UuWxLNTS21BLzh/y3Pxl97fPh8MMhC8984nP7pO+JU6tgdYzrZC X-Received: by 2002:a50:de45:: with SMTP id a5mr26336878edl.91.1605103239272; Wed, 11 Nov 2020 06:00:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605103239; cv=none; d=google.com; s=arc-20160816; b=JYvGrx4X7ZmNk+8wS5YlsgysltOqVuXDco5ze8bI0beIUwbnqToBEvdOxX1bwgHVKP nO4SDj+MDu+RcHTFJeu+zH/2xoAdfeowP4IoqUb3sTa17OdiO80TEK+SJsWKuD9/wpez 4BUK9GuIcAym7aTcgmSrwkyA/mTMvroXLj7HGi99CpHOKzhZzBMMoQhK4S8xFKsXk+Ez sFT87KJ4vkFYGDTC26/dtUZfSS6PLOepnyevEZW44P+wWcH0tdAGVF/3zkem7AKx7TSx eQB1Z5wqlCei/1xFydd9LpO7VxnCkVEjcS26w0uZfmIrSFsxSZgPGpPwNLx2DwN+Br4A yPsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=n7osxaBOy/mjei5z0b2nj94AHyccmDW0Rw8P9uQpbXE=; b=ablhyNMk9jCAq1SXeLX+gAfiKpxCi3RoVrbAb8qsdMEmLNTnKrAsat6eYzKTMz14Rh T3iOqM7FNlkZgOz2ldR1fDrh9tH05KsNVKGy2pMvgERdf44P1OF9MWac1pSkBX1gSDXr ZT6O2trsszhtsPraSKuWKyjtWT+zh6nFWKFaYpdMAKHYtucDqSMptRZc7cRsjtmg5bmh 4j8cPV45fK2umwmrVCclSBhx4vOksCnNq7JHTHasDNhQlc+bhWcqNQ8IGif9+7tcpVPw Ge5JFYeCIIKv9oKT2NzzfzWilHm7ys2gCovkIO4rLKgnKufTGbvWIOyzt5I5Mj05ZCDw AGCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=MmgmHT3+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v11si1292783ejx.648.2020.11.11.06.00.08; Wed, 11 Nov 2020 06:00:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=MmgmHT3+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727116AbgKKNzV (ORCPT + 99 others); Wed, 11 Nov 2020 08:55:21 -0500 Received: from mx2.suse.de ([195.135.220.15]:33754 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727019AbgKKNzM (ORCPT ); Wed, 11 Nov 2020 08:55:12 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1605102911; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=n7osxaBOy/mjei5z0b2nj94AHyccmDW0Rw8P9uQpbXE=; b=MmgmHT3+cSWwLQk+pJ4jogk8fV4g+2I7/M4GsUpXzqC2zLVwsNPGzNQ2vgg7yIH2yUwUR4 YTHPg7n8/JJh9ccHv7RWdrDJY9exww3K4gFiPH2WZtQ8aBE72Z4g0wTXU/X84a7myGad6U igRxRY0wiPrRo8djcyI1kf85aixw5Bk= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 7B93EABD1; Wed, 11 Nov 2020 13:55:11 +0000 (UTC) From: Petr Mladek To: Sergey Senozhatsky , Steven Rostedt , John Ogness Cc: Linus Torvalds , Guenter Roeck , Shreyas Joshi , shreyasjoshi15@gmail.com, Greg Kroah-Hartman , Sergey Senozhatsky , linux-kernel@vger.kernel.org, Petr Mladek Subject: [PATCH 0/2] printk/console: Use ttynull when no console is available or wanted Date: Wed, 11 Nov 2020 14:54:48 +0100 Message-Id: <20201111135450.11214-1-pmladek@suse.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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/20201006025935.GA597@jagdpanzerIV.localdomain 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(-) -- 2.26.2