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 EB2AF350A33 for ; Tue, 21 Oct 2025 20:55:55 +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=1761080156; cv=none; b=c+U+MLGViEoYrSuxw9GMd1An0GW2/U31RcZeBIwSfiFSUr6D6G/W+vesgmuyWD8p9YiawWtACfh+Zb3iIGC7iTiWl/qUjZxPTsILZY4m2iAESIW/KNpgGUCtISWAzYpYfADEl+kQL06AzEJSvgAkcOT0SCk2FmwG5KkHPV8uy6Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761080156; c=relaxed/simple; bh=vVgTfD/p1RGBzx6BybmkHd+Rqhr/VPoAr46sn9HGhdM=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=M5L7GS6L7DRN5tOFaoBtiX2+lTsbvL1c1OHFj76DGH5PPumnFnJLScyKL0B5ge1Qg9CE2IMaBW4V7mmT5mJfNqyz2CyG3AtesEEKK3Sbia7FTtwlHNyRQDfAj5jeaJvNTRqaM5/P19ts1btAmuFOPblPXJ6n0vekkT9Fs3zFCTU= 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=VSgs2JzP; 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="VSgs2JzP" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 53602C4CEF7; Tue, 21 Oct 2025 20:55:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1761080155; bh=vVgTfD/p1RGBzx6BybmkHd+Rqhr/VPoAr46sn9HGhdM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=VSgs2JzPcxjeE5GLUOdsgNXRTFW3JyMO8Ngg87lJM2mG6NrabjdY1KQxoVlNcf9Cp 2paONoZ7GrbSyR/ewiTK4v9t2p/HmAZYLIsQQgACO0USyrPtTx6gx9Y9S/EbIwmESD rzmevsxCqIb7eVTcszLPHtRXitC00gEmzOZ5IXw0= Date: Tue, 21 Oct 2025 13:55:53 -0700 From: Andrew Morton To: Doug 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: <20251021135553.811b77539d2d41fff3c3b992@linux-foundation.org> In-Reply-To: References: <20251019100605.1.I095f1e2c6c27f9f4de0b4841f725f356c643a13f@changeid> <20251020115132.10897a599c8fbda4829b3f89@linux-foundation.org> 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 Mon, 20 Oct 2025 13:00:22 -0700 Doug Anderson wrote: > > And the code would presumably be much simpler if we simply chunked up > > the printing and spat out one really long line. > > I'm not quite sure what you're suggesting. Before my changes we _do_ > try to spit out one really long line, but then printk() silently > truncates it for us at 1021 characters. Re-reading your suggestion, > I'm not sure if you're suggesting that we improve printk() to handle > lines longer than 1021 characters by chunking them up, or if you're > suggesting that this code could use "pr_cont()" to chunk things up. > ...or something totally different. ;-) Can you clarify? I was suggsting the latter - emit these really long lines via repeated calls to printk().