From nobody Fri Dec 19 17:42:01 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D9D44C07E9D for ; Mon, 26 Sep 2022 11:21:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237728AbiIZLV5 (ORCPT ); Mon, 26 Sep 2022 07:21:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237664AbiIZLTm (ORCPT ); Mon, 26 Sep 2022 07:19:42 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E29852454; Mon, 26 Sep 2022 03:39:07 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id CD1FBB8095C; Mon, 26 Sep 2022 10:37:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0F182C433C1; Mon, 26 Sep 2022 10:37:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664188670; bh=6Z96eXjVRRr1HvpDRdgPDwRE1VX2O2GqrBUwuYg3+Dk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oQQrc1z3kuxF9+05VSiaSRCe+bdiCC251tBASoOQbA0AmaupGzHhEm+2nP9dAXFDq qfwp/0vF4uz1BWjUi9+/yUir3tFsVwR9KVGHhEzdVDfrRZnGaXOwNROmkWQHqmdnuT JGEcTRq+uK7peegjLa1AFk+XHCFNTKdPFpM8j9GQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Thomas Meyer , Christian Lamparter , Richard Weinberger , Sasha Levin Subject: [PATCH 5.15 082/148] um: fix default console kernel parameter Date: Mon, 26 Sep 2022 12:11:56 +0200 Message-Id: <20220926100759.119720109@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100756.074519146@linuxfoundation.org> References: <20220926100756.074519146@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Christian Lamparter [ Upstream commit 782b1f70f8a8b28571949d2ba43fe88b96d75ec3 ] OpenWrt's UML with 5.15 was producing odd errors/warnings during preinit part of the early userspace portion: |[ 0.000000] Kernel command line: ubd0=3Droot.img root=3D98:0 console=3D= tty |[...] |[ 0.440000] random: jshn: uninitialized urandom read (4 bytes read) |[ 0.460000] random: jshn: uninitialized urandom read (4 bytes read) |/etc/preinit: line 47: can't create /dev/tty: No such device or address |/etc/preinit: line 48: can't create /dev/tty: No such device or address |/etc/preinit: line 58: can't open /dev/tty: No such device or address |[...] repeated many times That "/dev/tty" came from the command line (which is automatically added if no console=3D parameter was specified for the uml binary). The TLDP project tells the following about the /dev/tty: | /dev/tty stands for the controlling terminal (if any) for the current | process.[...] | /dev/tty is something like a link to the actually terminal device[..] The "(if any)" is important here, since it's possible for processes to not have a controlling terminal. I think this was a simple typo and the author wanted tty0 there. CC: Thomas Meyer Fixes: d7ffac33631b ("um: stdio_console: Make preferred console") Signed-off-by: Christian Lamparter Signed-off-by: Richard Weinberger Signed-off-by: Sasha Levin --- arch/um/kernel/um_arch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/um/kernel/um_arch.c b/arch/um/kernel/um_arch.c index 960f5c35ad1b..8dc7ab1f3cd4 100644 --- a/arch/um/kernel/um_arch.c +++ b/arch/um/kernel/um_arch.c @@ -31,7 +31,7 @@ #include =20 #define DEFAULT_COMMAND_LINE_ROOT "root=3D98:0" -#define DEFAULT_COMMAND_LINE_CONSOLE "console=3Dtty" +#define DEFAULT_COMMAND_LINE_CONSOLE "console=3Dtty0" =20 /* Changed in add_arg and setup_arch, which run before SMP is started */ static char __initdata command_line[COMMAND_LINE_SIZE] =3D { 0 }; --=20 2.35.1