Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp502222ybk; Wed, 20 May 2020 05:13:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQIbQGtXRBpvrFoRhSFdV5LChHlaowpzCtG0OWQUP/QCvverJFkd5Vd+VSQp7HkyieyqgN X-Received: by 2002:a17:906:dd8:: with SMTP id p24mr3294057eji.93.1589976831738; Wed, 20 May 2020 05:13:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589976831; cv=none; d=google.com; s=arc-20160816; b=URsEef27xs1AfUqgNq6Lc4cgShN7q8FQPctuEtZJ8yj9D7+twlRpQAhBDR8i4nur7Q Xo7ZbM7GzQwY807CRqNg4hEz1bSvl7WVvLuq5T8hYuS0+YZu9XeAS/mSVg+mME3EvdGc mFwCpgkk90+Y2yFzqrhr+/EEVrj3k/WNy/vwVAX8LioAyhPgY/Hs1GKSsmYqZC0gtXv6 028zFYiZec/kbSrhbdwCTOo7r0mfrz2DB9txyo3I6JcLUdBlNR6LuPPpYdLeGGE6jCjJ N1qO5U0TuukubDcN1k2Z8DCqX3Wi10IzPK3Eol+rEVXsunFjhAlz2kxmkGlWKlV82+5r HsXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:date:from :dkim-signature; bh=7s0+LV72ub/a+786F9odlZ55dRyq5sEXo2G9RCgt8/I=; b=eWTAWo6x9ie48l4Z4o0z2EVDq6IsC2vvbqqOzLLTXwPlFsqr6lajpCjGSZpmWZGzV6 DJnx/m84R3XqGYGiaJDsyguv9lv5dSi2+tksI8hHiz7swZPY7EjL+ONHvX2FXOzpMTew LPs5U1vPyw6l7602pF5yg+znZ5Pc2YP+atUUGmdZuod/AWokEQQfTkzPenM8OG49ub9k gNeExxznGgHcoafeWG7Al8tE/iTLUl05QMxgqIx5XI6v+GHw4TV3Hak0GdhCCEohGS65 E0tHtDP5ECSAUou8G+iohAcT0et7BjN6HqvOCMpxSR2H8hI6k84rLZgRuH1EOcZmGee7 Gipw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="ddIf/cCu"; 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 oq26si1543589ejb.727.2020.05.20.05.13.29; Wed, 20 May 2020 05:13:51 -0700 (PDT) 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="ddIf/cCu"; 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 S1726881AbgETMKD (ORCPT + 99 others); Wed, 20 May 2020 08:10:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34406 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726224AbgETMKD (ORCPT ); Wed, 20 May 2020 08:10:03 -0400 Received: from mail-pl1-x644.google.com (mail-pl1-x644.google.com [IPv6:2607:f8b0:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38CD3C061A0E for ; Wed, 20 May 2020 05:10:03 -0700 (PDT) Received: by mail-pl1-x644.google.com with SMTP id d3so1254483pln.1 for ; Wed, 20 May 2020 05:10:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=7s0+LV72ub/a+786F9odlZ55dRyq5sEXo2G9RCgt8/I=; b=ddIf/cCurXvxmYq3gMSu1w93t13vVkRKqKC401hPmZ2fdF5ZqfyWLYaGkEw2tuhfJs loefqdYAzxiT00WBLy9ijMDRMkrrUlkQRu6bk1Nh95QCjgGDuM6JKkMJGEzpHjn4TYTW goT8f+uvMpJ8t164pzWkOAKeKZzh60BUfc3qySCQL8jsWj6YHJLK8U8K+qxu2MoYAPHB SyJtWVTZum4LaR0ayDyCrArDkfbtNF1V+9lUnNEc9aVkiJGwrjyBLlVsoq74mHj1Ph3L mOg1CjywCtsT2/EW1zIg9I/Os7nbWs94907hBCNUOqq2Fip4I723VbSWTyjFNDw8EKba rsEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=7s0+LV72ub/a+786F9odlZ55dRyq5sEXo2G9RCgt8/I=; b=pxKqfuQ6NvqWsHQRfZjrfY1SHqaXjaV3VgekFZpijMy1JS5srYVxHDjmrUc4p0K798 juB5kqOo/71FnwiAg86HWFuzVBTITpWzNUK5kbVrhq5OqExA833zdw5wo7Gz7ZQC84u1 4cKrQf098oaacZcJVx7mNdsquia6u+6+z6wPTQU9jq364V6Elu6rldsm867u8B6NrXRJ AVwm81wtJbAI8Lr3N1gVsnpZ4FxxdXI8EfAxeQbNLCjpGr5FTGMYuQcYZsXA7sIQR6o8 bwlacs9E0q8e8Svn+bT9jAtpERWv/h0sd+wAKg0e9X6oxHmYcpdwjYHTrFhBALXy0BiP ktrQ== X-Gm-Message-State: AOAM5300l/XnVg/W21b5/IS7Cya76AZ5SfNytL5vGoLsWyJcGejEAH/T 1PLeEYqFetleYQkMhpXhUTg= X-Received: by 2002:a17:90a:2305:: with SMTP id f5mr5087883pje.57.1589976602794; Wed, 20 May 2020 05:10:02 -0700 (PDT) Received: from localhost ([2409:10:2e40:5100:6e29:95ff:fe2d:8f34]) by smtp.gmail.com with ESMTPSA id n23sm1952562pjq.18.2020.05.20.05.10.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 May 2020 05:10:02 -0700 (PDT) From: Sergey Senozhatsky X-Google-Original-From: Sergey Senozhatsky Date: Wed, 20 May 2020 21:10:00 +0900 To: Joe Perches Cc: Sergey Senozhatsky , Andrew Morton , Chenggang Wang , linux-kernel@vger.kernel.org, Petr Mladek , Steven Rostedt Subject: Re: [RFC PATCH 2/2] init: Allow multi-line output of kernel command line Message-ID: <20200520121000.GF520@jagdpanzerIV.localdomain> References: <2b3832fed9370f0f8dfd1ea33dddb1d05a36e265.1589916689.git.joe@perches.com> <20200520044127.GB938@jagdpanzerIV.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (20/05/19 21:58), Joe Perches wrote: [..] > > Maybe we can > > use here something rather random and much shorter instead. E.g. > > 256 chars. Hmm. How > > min(some_max like 132/256, PRINTK_LOG_LINE_MAX) > > would work. An alternative approach would be to do what we do in the print_modules() (the list of modules which can definitely be longer than 1K chars). We can split command line in a loop - memchr(pos, ' ') - and pr_cont() parts of the command line. pr_cont() has overflow control and it flushes cont buffer before it overflows, so we should not lose anything. -ss