From: Rusty Russell <rusty@rustcorp.com.au>
To: Laura Abbott <labbott@redhat.com>,
Laura Abbott <labbott@fedoraproject.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [RFC][PATCH] module: Limit line length of module prints
Date: Mon, 14 Dec 2015 11:36:51 +1030 [thread overview]
Message-ID: <87poy9g7o4.fsf@rustcorp.com.au> (raw)
In-Reply-To: <566B4D68.20409@redhat.com>
Laura Abbott <labbott@redhat.com> writes:
> On 12/11/2015 01:39 AM, Rusty Russell wrote:
>> Laura Abbott <labbott@fedoraproject.org> 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 <labbott@fedoraproject.org>
>>> ---
>>> 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.
next prev parent reply other threads:[~2015-12-14 3:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-11 1:50 [RFC][PATCH] module: Limit line length of module prints Laura Abbott
2015-12-11 9:39 ` Rusty Russell
2015-12-11 22:25 ` Laura Abbott
2015-12-14 1:06 ` Rusty Russell [this message]
2015-12-15 22:47 ` Laura Abbott
[not found] ` <CAGG-pUT9stutifHDUyD8WiFaU5Ysp1vVaRpu7tShZEQEV+7Daw@mail.gmail.com>
2015-12-11 22:22 ` Laura Abbott
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87poy9g7o4.fsf@rustcorp.com.au \
--to=rusty@rustcorp.com.au \
--cc=labbott@fedoraproject.org \
--cc=labbott@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox