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]
Message-Id: <20080213155701.48871761.akpm@linux-foundation.org>
Date:	Wed, 13 Feb 2008 15:57:01 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Tejun Heo <htejun@...il.com>
Cc:	jeff@...zik.org, linux-ide@...r.kernel.org,
	jengelh@...putergmbh.de, matthew@....cx, randy.dunlap@...cle.com,
	daniel.ritz-ml@...ssonline.ch, linux-kernel@...r.kernel.org
Subject: Re: [PATCHSET] printk: implement printk_header() and merging
 printk, take #3

On Wed, 13 Feb 2008 18:09:28 +0900
Tejun Heo <htejun@...il.com> wrote:

> This is the third take of implement-printk_header-and-mprintk
> patchset.
> 
> Changes from the last take[L] are...
> 
> * Now header is printed on every line of a multiline message.  If the
>   header ends with ':' followed by spaces.  The colon is replaced with
>   space from the second line.
> 
> * s/mprintk/mprintk_flush/ and s/mprintk_add/mprintk/ as suggested.
> 
> * mprintk_init_alloc() and mprintk_free() added to ease malloc'd
>   buffer handling.  No need to specify buffer size.  Sizing is left to
>   mprintk.
> 
> This patchset aims to make printing multiline messages and assembling
> message piece-by-piece easier.
> 
> In a nutshell, printk_header() lets you do the following atomically
> (against other messages).
> 
>  code:
>   printk(KERN_INFO "ata1.00: ", "line0\nline1\nline2\n");
> 
>  output:
>   <6>ata1.00: line0
>   <6>ata1.00  line1
>   <6>ata1.00  line2

That seems sensible.

> And mprintk the following.
> 
>  code:
>   DEFINE_MPRINTK(mp, 2 * 80);
> 
>   mprintk_set_header(&mp, KERN_INFO "ata%u.%2u: ", 1, 0);
>   mprintk_push(&mp, "ATA %d", 7);
>   mprintk_push(&mp, ", %u sectors\n", 1024);
>   mprintk(&mp, "everything seems dandy\n");
> 
>  output:
>   <6>ata1.00: ATA 7, 1024 sectors
>   <6>ata1.00  everything seems dandy
> 

And that looks like an awful lot of fuss.  Is it really worth doing?
--
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