lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 15 Nov 2011 08:50:01 +0800
From:	Huang Ying <ying.huang@...el.com>
To:	Joe Perches <joe@...ches.com>
Cc:	William Douglas <william.r.douglas@...il.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: Printk mulitple line message support

On Mon, 2011-11-14 at 22:40 +0800, Joe Perches wrote:
> On Mon, 2011-11-14 at 14:58 +0800, Huang Ying wrote:
> > Hi,
> > 
> > In most cases, printk only guarantees messages from different printk
> > calling will not be interleaved between each other.  But many printk
> > users uses multiple line to form a complete message and call printk
> > for each line.  So the following situation is possible for two printk
> > users running on two CPUs.
> > 
> > line 1 of message from printk user1
> > line 1 of message from printk user2
> > line 2 of message from printk user1
> > line 2 of message from printk user2
> > 
> > This makes kernel log hard to read.  One possible solution to this
> > issue is to give a sequence number (or ID) to each complete message.
> > So the above lines will be:
> > 
> > {1}line 1 of message from printk user1
> > {2}line 1 of message from printk user2
> > {1}line 2 of message from printk user1
> > {2}line 2 of message from printk user2
> > 
> > Then some simple script can be used to group lines together according
> > to sequence number in lines.
> > 
> > What do you think about that?
> 
> This makes the typical multi-part but non-interleaved
> output difficult to read.

With a simple script, we can strip out the sequence # easily.

> How about determining if there is interleaving and
> emitting sequence # only in those cases?
> 
> Perhaps test the atomic for the last sequence #.

So we will have no sequence # prefix for printk user1's lines if printk
user 2 comes in the middle?  Something as follow?

line 1 of message from printk user1
{2}line 1 of message from printk user2
line 2 of message from printk user1
{2}line 2 of message from printk user2

This will make it hard for a script to sort the lines.  Where should it
insert lines from printk user2 in the sort result?

Best Regards,
Huang Ying


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ