Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752263AbbLNDZa (ORCPT ); Sun, 13 Dec 2015 22:25:30 -0500 Received: from ozlabs.org ([103.22.144.67]:42907 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751952AbbLNDZ3 (ORCPT ); Sun, 13 Dec 2015 22:25:29 -0500 From: Rusty Russell To: Laura Abbott , Laura Abbott Cc: linux-kernel@vger.kernel.org Subject: Re: [RFC][PATCH] module: Limit line length of module prints In-Reply-To: <566B4D68.20409@redhat.com> References: <1449798632-29248-1-git-send-email-labbott@fedoraproject.org> <87a8phgw83.fsf@rustcorp.com.au> <566B4D68.20409@redhat.com> User-Agent: Notmuch/0.20.2 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu) Date: Mon, 14 Dec 2015 11:36:51 +1030 Message-ID: <87poy9g7o4.fsf@rustcorp.com.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1900 Lines: 53 Laura Abbott writes: > On 12/11/2015 01:39 AM, Rusty Russell wrote: >> Laura Abbott writes: >>> print_modules currently uses pr_cont to print all module information. >>> This has the side effect of printing lots of modules on one very long >>> line. This makes copy/pasting oopses more effort if manual wrapping is >>> required. Place a reasonable limit (80 chars) on the number of modules >>> on each line. >>> >>> Signed-off-by: Laura Abbott >>> --- >>> Does this bother anyone else or am I the only one who hates dealing >>> with the long lines of "Modules linked in"? >> >> Never bothered me, but I'm a bit odd :) I worry more about the effect >> on machine parsing. >> > > Yes, that was a concern I had as well, but the module list seems to get > wrapped eventually (although at a much longer length) so it seems like > if machine parsing can handle one wrap it can handle multiple wraps. Does it? I find that code very hard to parse, but seems like something happens at 1024 chars. But my testing here doesn't show any such break in dmesg, nor on serial console. diff --git a/kernel/module.c b/kernel/module.c index 912e891e0e2f..f882d9d99844 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -3925,6 +3925,12 @@ static const struct file_operations proc_modules_operations = { static int __init proc_modules_init(void) { + int x; + printk("Test of long line:"); + for (x = 0; x < 1024; x++) + pr_cont("%c%c", (x % 26) + 'A', (x % 26) + 'A'); + pr_cont("\n"); + proc_create("modules", 0, NULL, &proc_modules_operations); return 0; } Confused, Rusty. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/