From mboxrd@z Thu Jan 1 00:00:00 1970 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 39A6AC7619A for ; Wed, 12 Apr 2023 02:47:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229639AbjDLCq7 (ORCPT ); Tue, 11 Apr 2023 22:46:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229450AbjDLCq5 (ORCPT ); Tue, 11 Apr 2023 22:46:57 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8641103 for ; Tue, 11 Apr 2023 19:46:56 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 4E5A460FFC for ; Wed, 12 Apr 2023 02:46:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0BD51C433D2; Wed, 12 Apr 2023 02:46:54 +0000 (UTC) Date: Tue, 11 Apr 2023 22:46:52 -0400 From: Steven Rostedt To: Sergey Senozhatsky Cc: Petr Mladek , Andrew Morton , Yosry Ahmed , linux-kernel@vger.kernel.org Subject: Re: [PATCHv2] seq_buf: add seq_buf_do_printk() helper Message-ID: <20230411224652.576dd18c@gandalf.local.home> In-Reply-To: <20230411143852.868524-1-senozhatsky@chromium.org> References: <20230411143852.868524-1-senozhatsky@chromium.org> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 11 Apr 2023 23:38:52 +0900 Sergey Senozhatsky wrote: > Sometimes we use seq_buf to format a string buffer, which > we then pass to printk(). However, in certain situations > the seq_buf string buffer can get too big, exceeding the > PRINTKRB_RECORD_MAX bytes limit, and causing printk() to > truncate the string. > > Add a new seq_buf helper. This helper prints the seq_buf > string buffer line by line, using \n as a delimiter, > rather than passing the whole string buffer to printk() > at once. > > Signed-off-by: Sergey Senozhatsky Looks good to me. Want me to pull this in my tree, or do you have patches dependent on this? -- Steve