From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6AB7325A65B for ; Mon, 20 Oct 2025 18:51:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760986294; cv=none; b=F4n9mcsUQOTheRumcwpaOLvoxEVVfmBknZqpzDTVi6wE8liHpgtI9g/Zi3ZCn38FTD84n+8UX3nzC+V0sFuKPs/WqXwRPK0COeH1BU7hXPbshN+v5mX6UbsI4aOQxnazNM6euSzt7bN9vjpLK8uQLdBr1r3qNAl3oQTVhr2WP+E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760986294; c=relaxed/simple; bh=40LTusOts5S9t0vBDeulq6YZCZDkQDSQp5HJ5bDVNnU=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=FjXQy91edt/j6zMXNDuUHfQBY+NtPbXP9eZ57l2HkGhtme4ZYTK7aB4ZjwYi2OiB/XgMTc0glAIVJ23lwzUKckCh2vUFyn/7loftMt+iNZiJq8313VkaDJPSferZS5fP290DUE5Avj7cVZyYnm+FDhkIrR2FRDLmYaFq6wxGLE0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=WkNfyVdJ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="WkNfyVdJ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 25F2DC113D0; Mon, 20 Oct 2025 18:51:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1760986293; bh=40LTusOts5S9t0vBDeulq6YZCZDkQDSQp5HJ5bDVNnU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=WkNfyVdJHb997RiacCKoiESXQWvl5qv62lTfBduxMC6Yy8VC1R4vLFSo+A44gAAEi nRJsAt91Z5jVmPp61XHAGax5UVBZ8IomtiBGjcPEYnVDrzCS0SIXz96YSSLPlTWD+s Jh4ZrM2NaSu1av+YvsczRKbWIGuAGn5hCFTs0le4= Date: Mon, 20 Oct 2025 11:51:32 -0700 From: Andrew Morton To: Douglas Anderson Cc: linux-kernel@vger.kernel.org, Andrew Chant , Alexander Shishkin , Brian Gerst , Christian Brauner , Francesco Valla , Geert Uytterhoeven , Guo Weikang , Huacai Chen , Jan Hendrik Farr , Jeff Xu , Kees Cook , Masahiro Yamada , Michal =?ISO-8859-1?Q?Koutn=FD?= , Miguel Ojeda , "Mike Rapoport (Microsoft)" , Nathan Chancellor , Peter Zijlstra , Randy Dunlap , Shakeel Butt , Tejun Heo , Thomas Gleixner , Thomas =?ISO-8859-1?Q?Wei=DFschuh?= , "Uladzislau Rezki (Sony)" Subject: Re: [PATCH] init/main.c: Wrap long kernel cmdline when printing to logs Message-Id: <20251020115132.10897a599c8fbda4829b3f89@linux-foundation.org> In-Reply-To: <20251019100605.1.I095f1e2c6c27f9f4de0b4841f725f356c643a13f@changeid> References: <20251019100605.1.I095f1e2c6c27f9f4de0b4841f725f356c643a13f@changeid> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Sun, 19 Oct 2025 10:06:14 -0700 Douglas Anderson wrote: > The kernel cmdline length is allowed to be longer than what printk can > handle. When this happens the cmdline that's printed to the kernel > ring buffer at bootup is cutoff and some kernel cmdline options are > "hidden" from the logs. This undercuts the usefulness of the log > message. > > Add wrapping to the printout. Do we really need the wrapping? That will confuse anything which parses the output expecting a single line. And the code would presumably be much simpler if we simply chunked up the printing and spat out one really long line.