From patchwork Sat Aug 6 19:52:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Lamparter X-Patchwork-Id: 1664268 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=4i/5FleO; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=Y0PuEB4t; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4M0Y691Pxzz9sCD for ; Sun, 7 Aug 2022 05:52:46 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=brkIas/wJ9KwNbpOWSGjL/zO/fqqNTQJW1w1xOz+CPc=; b=4i/5FleOOFnET2 3m0KOIPcnrGPNSfmfhN7E9ZxIDP6Z6PYhei7hUwDGBDak+/Ut4N/W+ipNEGVhe1fCxCZau8PP1Dbh FlyJ7+90SCm+FlUWtZlRTEkshmDm55pV0Wh7lCPS8LBwUgKMvbwQyMGOQitz1vYjwEOhshCr/K1jT QifimyOMbVjDC/TEEVxn35Gk8jL/YjbqObCd2af1vhl3HmfGhCAGlGDC9Bn4VNFDqr34EQt4q03yP kv/Ee0YnxyJr4z2nSElr8ztwf9D7hkOVvjEIXYsSLxlpyHujTPCKZkuaQ1hFyMu5Ifka8/jUuHnDP 4cvTwwSgNOkOCggc+HvQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oKPqY-00H16H-Se; Sat, 06 Aug 2022 19:52:30 +0000 Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oKPqV-00H10N-Gp for linux-um@lists.infradead.org; Sat, 06 Aug 2022 19:52:28 +0000 Received: by mail-ej1-x634.google.com with SMTP id j8so10219034ejx.9 for ; Sat, 06 Aug 2022 12:52:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc; bh=gFyLD96nupIprPVUVod0j8oQpn8a1zg22WwnhiZSZDY=; b=Y0PuEB4t3aFQR4JwogWGOGBUy9nQ63OaQIXPSwfEtNgt9r0nGrchgxCv41zZ3p50Mp fUJ4KR4TsyIT0Gg2oEWemXx+Vi7gN8xu4LnCI7VZ+wQwK1P2AGrINZOziSnFID/aUrbX wvl0lRmpHgVDDfbWEBCkkx0VTQnvB7BKjA3+kMX6Sn2kWob5zogVXs1maB5rqMJ0les7 /6QWbxxoc66nQzc1HL71g5O6vaWCdxXqjwVNmZbSkJ6HckABed+tG4g7SNqXodSP3CR3 2F2IrBJhe/WpRDJmk/F1xU0JBjbEZSGJZZwaNdgoCNtZrgR1TW5aPQtEScsF1lgilFs6 GRvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc; bh=gFyLD96nupIprPVUVod0j8oQpn8a1zg22WwnhiZSZDY=; b=QG6rTydPAjnRZZUTRbSlI1ONG4MiI6zaOxdC2EmX9OxtFlPgpo0EoARsJOlWFt/pWO rIaFH+WrraujqKtRrgyciWBwHkoMG/3bA2FLWqUIcNdAUKqwR7DKOR0cAO2NupxCZJtM /Z8fWLbeUovD94GqjZo5P2X69Ehhq88fqWQdWqz5B1CAw9mVmPH7qeC14oAnH4XthkWD nENS73FSCat5chEn8ss3F2dbwiP0VDEjXUgCHYG5W5Len5qkbrZZdIyQY12h70drmwaB ohjAfAYGGZ8WuHptnlu4lA6QAS9nX/WxweR9Le0Mjb8Rw/RLKTb8S2EyrfhOYQ0lccre brXQ== X-Gm-Message-State: ACgBeo2UEnj/VB8lZmkyP+t2U1EC/GxNlYfx9RZu7IWIN9KmHbSH361C Yu6tTd/aUY+Tj06Qe7pWMzR7VA1Uk6E= X-Google-Smtp-Source: AA6agR4KiKxezL+zLHhzxgLU7kd0hSAtckNKqwOBjVb7uuX1QfbH0HraqOEcjjblPKFvvQ+Fnuxnww== X-Received: by 2002:a17:907:7603:b0:730:9e05:1110 with SMTP id jx3-20020a170907760300b007309e051110mr8970371ejc.591.1659815544473; Sat, 06 Aug 2022 12:52:24 -0700 (PDT) Received: from debian64.daheim (pd9e29ff2.dip0.t-ipconnect.de. [217.226.159.242]) by smtp.gmail.com with ESMTPSA id t20-20020a17090616d400b0072efb6c9697sm2998477ejd.101.2022.08.06.12.52.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Aug 2022 12:52:23 -0700 (PDT) Received: from chuck by debian64.daheim with local (Exim 4.96) (envelope-from ) id 1oKPqR-0047gQ-0O; Sat, 06 Aug 2022 21:52:23 +0200 From: Christian Lamparter To: linux-um@lists.infradead.org Cc: Richard Weinberger , Anton Ivanov , Johannes Berg , Thomas Meyer Subject: [PATCH v1 1/2] um: fix default console kernel parameter Date: Sat, 6 Aug 2022 21:52:22 +0200 Message-Id: <53b5c5f559cc95fc676cb4cc9e5a8d9f0cb8f58c.1659815468.git.chunkeey@gmail.com> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220806_125227_579736_51CE5979 X-CRM114-Status: GOOD ( 14.64 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 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=root.img root=98:0 console=tty |[...] |[ 0.440000] random: jshn: uninitialized urandom read (4 bytes read) |[ 0.460000] random: jshn: uninitialized urandom read [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:634 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [chunkeey[at]gmail.com] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-um@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-um" Errors-To: linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org 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=root.img root=98:0 console=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= 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 --- 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 9838967d0b2f..9c6991f42131 100644 --- a/arch/um/kernel/um_arch.c +++ b/arch/um/kernel/um_arch.c @@ -32,7 +32,7 @@ #include "um_arch.h" #define DEFAULT_COMMAND_LINE_ROOT "root=98:0" -#define DEFAULT_COMMAND_LINE_CONSOLE "console=tty" +#define DEFAULT_COMMAND_LINE_CONSOLE "console=tty0" /* Changed in add_arg and setup_arch, which run before SMP is started */ static char __initdata command_line[COMMAND_LINE_SIZE] = { 0 }; From patchwork Sat Aug 6 19:52:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Lamparter X-Patchwork-Id: 1664269 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=C3i7F/O6; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=ivKQG/v6; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4M0Y691K94z9s1l for ; Sun, 7 Aug 2022 05:52:46 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=LefHVF5XydkBAJ6ZfQFT7zDtrYzEuvIhdMr/FD5/QD4=; b=C3i7F/O6aIO65C R4HgVsUW8Zed8Fk8QoD5BgPK2XvEHgBgB+2U5gKUiG8t8ZGtsPKn2E9qqLcf9OFlQxZCxys6AUtxi RliOZD64JNBr+7E3QmCOX4q3F9hl3JpeWuT+kx4z2MivM7jLeH9+Oh6dFpa1J/EPZjY0iEW0bUwa2 syg3hNqmHNVB4qKC2A96B6Eo5YFS6Zh4KNT4wub+cv25NReVUOCnToCupTJKqZBLxYPq9X6/Youej lK3OytAWVbmXjIR7C3zgVVO12KwBuUcnQIeq+di5xXKGQHhjT+UXTKEPVSMDOnpp96p1tOMqElZYS g3SiI70ATUABul0uR1wA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oKPqY-00H166-KL; Sat, 06 Aug 2022 19:52:30 +0000 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oKPqV-00H10M-5l for linux-um@lists.infradead.org; Sat, 06 Aug 2022 19:52:28 +0000 Received: by mail-ej1-x62d.google.com with SMTP id a7so10291442ejp.2 for ; Sat, 06 Aug 2022 12:52:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=BqfekyGfFgpoI0J/l5X84H8hqhT0fJpXM5vJ3NMOHwM=; b=ivKQG/v6FNiDil7eoUxChERoJjCvb4SaBrzCBCg9yY3vhe55FslzhRTG5MfTacYLzo jhm5Kz1zdxnTNrt9ZLTAJzXnB91LdHL3fM5G5RudBSEww+ziHz9zTyqJzW2vkoITTICi VYefmb1pVsjQKN6Dcb2aOmZKzqbNGJBYhN2kqZPyGVWHyoO/D3/yUYWQJcezUc99Pr0g JCM9FmzCJNKdrw4hWSfUq3LdJR25pkIbHchznFKi5sxBorqjOHyjWJyrAtzAzihUnsUj rs5mYrFl1slSnnExtAGpnH08RQTIDC5ftPa3jbqQA7ejD7fqfQvarDDVLSve+9eluIBz cobQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=BqfekyGfFgpoI0J/l5X84H8hqhT0fJpXM5vJ3NMOHwM=; b=yHOEFJ/UxmjqtajiFv7TCjE4h43yaxOMQZ1oB25gb1LJ3R1xwR+XT1abf/PrqTImMG TSsL8m30q2kfvHe5AoyRld5sTBFL05ac8FJqQnocSZuyp6yw8AMUNMy98FN3v0WbpIsV znTOvRYvxu2lH2j3MnEFVi7dFtNTRkNfoyWmD2zGG/Uum5uSxbyqTDEoRdZ9jo0qpHqE XAIyrHT7NUTFBPEbTZBA5L8sFRrgLfJ69ffJs55WnF7YNb/JBdA/6wo48SkZtLxFaioF TI16kzMDKUmAyykTzaiqS+vtQvSG57b70UkETKF/KoLiAgpMIW8t+qL1wupIvwMeergY Tu8Q== X-Gm-Message-State: ACgBeo2tPadxNIF0LS1J0BSmFix5VSmDl6RY/PJ0VszGX3oIRjIWERE4 IF9t9IjmBWVQCI41oEikL7iMqKrMBaU= X-Google-Smtp-Source: AA6agR5rx90LlTygPdS3vV6Jd3eJcGdniTa3pKVR2KQt8u9xEPUXK8pFpJzxxf5Fo7UWzVSrdgqh5A== X-Received: by 2002:a17:907:2c74:b0:730:e9bc:b211 with SMTP id ib20-20020a1709072c7400b00730e9bcb211mr6863531ejc.63.1659815544146; Sat, 06 Aug 2022 12:52:24 -0700 (PDT) Received: from debian64.daheim (pd9e29ff2.dip0.t-ipconnect.de. [217.226.159.242]) by smtp.gmail.com with ESMTPSA id m1-20020a1709066d0100b007308bebce51sm3007101ejr.171.2022.08.06.12.52.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Aug 2022 12:52:23 -0700 (PDT) Received: from chuck by debian64.daheim with local (Exim 4.96) (envelope-from ) id 1oKPqR-0047gT-0T; Sat, 06 Aug 2022 21:52:23 +0200 From: Christian Lamparter To: linux-um@lists.infradead.org Cc: Richard Weinberger , Anton Ivanov , Johannes Berg Subject: [PATCH v1 2/2] um: increase default virtual physical memory to 64 MiB Date: Sat, 6 Aug 2022 21:52:23 +0200 Message-Id: X-Mailer: git-send-email 2.36.1 In-Reply-To: <53b5c5f559cc95fc676cb4cc9e5a8d9f0cb8f58c.1659815468.git.chunkeey@gmail.com> References: <53b5c5f559cc95fc676cb4cc9e5a8d9f0cb8f58c.1659815468.git.chunkeey@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220806_125227_258797_75B4AED8 X-CRM114-Status: GOOD ( 11.89 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: The current 32 MiB of RAM causes OOMs to appear shortly after booting in a minimal OpenWrt 22.03 configuration with a 5.10.134 kernel. Of course, passing a "mem=64M" (from the --help text) parameter works too, but it produces the following (info) message: Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:62d listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [chunkeey[at]gmail.com] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-um@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-um" Errors-To: linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org The current 32 MiB of RAM causes OOMs to appear shortly after booting in a minimal OpenWrt 22.03 configuration with a 5.10.134 kernel. Of course, passing a "mem=64M" (from the --help text) parameter works too, but it produces the following (info) message: | [ 0.000000] Unknown kernel command line parameters "mem=64M", will be passed to user space. That's why, I think it would be nicer, if this is working out of the box again :). Signed-off-by: Christian Lamparter --- 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 9c6991f42131..58aee676989c 100644 --- a/arch/um/kernel/um_arch.c +++ b/arch/um/kernel/um_arch.c @@ -131,7 +131,7 @@ static int have_root __initdata; static int have_console __initdata; /* Set in uml_mem_setup and modified in linux_main */ -long long physmem_size = 32 * 1024 * 1024; +long long physmem_size = 64 * 1024 * 1024; EXPORT_SYMBOL(physmem_size); static const char *usage_string =