Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp2868pxb; Wed, 11 Nov 2020 17:49:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJz0CHB2zDcS870fg8PEB1xv2ZnQZga/ntqPd6suVSwpVHUsEq/to+Mzh8AMBqd4cQ6raqic X-Received: by 2002:a17:906:6409:: with SMTP id d9mr27768798ejm.344.1605145740695; Wed, 11 Nov 2020 17:49:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605145740; cv=none; d=google.com; s=arc-20160816; b=1FB2YYu02rxGgeVuy8nZnpHgrEN419xQmNawdOfOHB0tQkiGiojcVBx9marhWTl+jp hbUg+52ZJSS2PI2f2e5E+imlTZI+mC0oNiMaNGPh/+6UFP7t4aN2b21ehAsfLRAM/zT8 zPW2tN+AlnMafbxO3Xe/yC5d+ZWg5+hPWcPpQZ3/G21JoZrwEMu9lcPg//wEgsg+FVmY godsvBftfVVqPPrVW0qYaFBXAJcLcB4EhMmWsRXhjdqBT4L9EpSn1vipZgdD4ZaAZ4ZK aOkfQkqjN/TuMTBQDEMwh2Ko4o3ZOn5BJTRBzNaBs2uQAnXd+cxso6TXOmzF/X+mYv9y LIMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=if2NS+ErTOsYO3OeviEhjyIzgRjlx4PlS3o3mhtx7Ow=; b=QDBWOUNXSPEEaxO1qiAZRHvwGZHPEujOXEzEpDW+9ael0reoLHtdfASTI+sqmqbJ2M rYAs4N+GJAi/6yJNdTTaSHfLIs5LKAL1cxsbGMoNsBQDNowQiww9nwSKw6GFbBZsyyWF 3sgH7dqVF6bUIeiJf0/ZFXEdAoBaX3Vcp8/u1kRqEtVQubO/g7oV6QETturRw9X2dLCx qu+JXcFX3QP3ncfBo2KAuasvsIBRpx9vH0wAQcV+ml3O6lYsBX4zYgG0jdxXovthtAgZ 7bi/6osb1aLY98tTbFRQa+zGCfKQddRUpAyJKDLJqJlhRVipbiGpeGi1czq4hjig8R39 aiDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=S37Ca0R9; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p3si3091938edd.200.2020.11.11.17.48.37; Wed, 11 Nov 2020 17:49:00 -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=@gmail.com header.s=20161025 header.b=S37Ca0R9; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728057AbgKLBgp (ORCPT + 99 others); Wed, 11 Nov 2020 20:36:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728000AbgKKX6t (ORCPT ); Wed, 11 Nov 2020 18:58:49 -0500 Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66717C0613D1 for ; Wed, 11 Nov 2020 15:58:49 -0800 (PST) Received: by mail-pf1-x441.google.com with SMTP id 10so2809284pfp.5 for ; Wed, 11 Nov 2020 15:58:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=if2NS+ErTOsYO3OeviEhjyIzgRjlx4PlS3o3mhtx7Ow=; b=S37Ca0R9aEdpZyzB6uJTLwCAxfpXx9Mza6g3/V/ZwSLPX8RLjn2pBkO7l7JEL/dnLC pUP11ysSMvyipTCX/me+MMu6IgKZNw6DeK/hocwOe54oTMksszgvwIDK+IoIewiTdpLx JjpOlNW+oyGV/zsky/Sk2se1J+5MPWjhcWKQHA64b4cExhLZeXgdF1UbzZizuKdGm0cO rjRJg5SE0Qf8sO0rB+dWYcFoZE1Vi5IXZuBI95VUt2Z9OAxUjl2s0mx9ENV+LKwCXjdX HuL/gcTO6yEztI757xy9GGR028QDmxw7Vc9C4hQyWgmOoLTmYVv45GPHSfHvOi5rU2M0 9IaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=if2NS+ErTOsYO3OeviEhjyIzgRjlx4PlS3o3mhtx7Ow=; b=sc04gm/Ew2o6jfFR7C8Ysg2aLIJcvS1TT+6+/hVqr9JBxchiRbJdpyy7YQPT4z4UwJ NVSwBwo51WN6x+1XjBJmuyHC3/NNKLnPE6jvQdQLYaUxDIqrmlCJvrMtGVvgbxcTAJIB rX5DoZMxDOD5ElMPmK+93aMIBh/by8K+Y1k+7246iFTuvpqguPrYRmATuEamdhyBwzBy PgJ9F2IQ7RTg1gx62g6SQ/GiDq58EdO25HbGX03MqIAZwZPkGSsPjEob1gN8iFJFjbf+ KQTqSHTgNy3ZG1nRy/4v8ycsXi+F8Y2CSVOX/yk4bSVHWRvmEHkz7JieRbT4aLOC5iRE B+Mw== X-Gm-Message-State: AOAM533cNykan06wEwdEIpo2eGULKjes3aeAAuEMBSeh2EuvZeTB58GW oS0QQON9PAfQJpGthadFf5E= X-Received: by 2002:a17:90a:fb90:: with SMTP id cp16mr6134133pjb.232.1605139128746; Wed, 11 Nov 2020 15:58:48 -0800 (PST) Received: from localhost ([2409:10:2e40:5100:6e29:95ff:fe2d:8f34]) by smtp.gmail.com with ESMTPSA id k26sm4003572pfg.8.2020.11.11.15.58.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Nov 2020 15:58:47 -0800 (PST) Date: Thu, 12 Nov 2020 08:58:44 +0900 From: Sergey Senozhatsky To: Petr Mladek Cc: Sergey Senozhatsky , Steven Rostedt , John Ogness , Linus Torvalds , Guenter Roeck , Shreyas Joshi , shreyasjoshi15@gmail.com, Greg Kroah-Hartman , Sergey Senozhatsky , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] init/console: Use ttynull as a fallback when there is no console Message-ID: References: <20201111135450.11214-1-pmladek@suse.com> <20201111135450.11214-2-pmladek@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201111135450.11214-2-pmladek@suse.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (20/11/11 14:54), Petr Mladek wrote: > stdin, stdout, and stderr standard I/O stream are created for the init > process. They are not available when there is no console registered > for /dev/console. It might lead to a crash when the init process > tries to use them, see the commit 48021f98130880dd742 ("printk: handle > blank console arguments passed in."). > > Normally, ttySX and ttyX consoles are used as a fallback when no consoles > are defined via the command line, device tree, or SPCR. But there > will be no console registered when an invalid console name is configured > or when the configured consoles do not exist on the system. > > Users even try to avoid the console intentionally, for example, > by using console="" or console=null. It is used on production > systems where the serial port or terminal are not visible to > users. Pushing messages to these consoles would just unnecessary > slowdown the system. > > Make sure that stdin, stdout, stderr, and /dev/console are always > available by a fallback to the existing ttynull driver. It has > been implemented for exactly this purpose but it was used only > when explicitly configured. > > Signed-off-by: Petr Mladek Acked-by: Sergey Senozhatsky -ss