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: <20140414155526.96b0832bf4660c026bc3a1d9@linux-foundation.org>
Date:	Mon, 14 Apr 2014 15:55:26 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Mitchel Humpherys <mitchelh@...eaurora.org>
Cc:	Christoph Lameter <cl@...ux-foundation.org>,
	Pekka Enberg <penberg@...nel.org>,
	Matt Mackall <mpm@...enic.com>, Joe Perches <joe@...ches.com>,
	linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] mm: convert some level-less printks to pr_*

On Thu, 27 Mar 2014 10:54:19 -0700 Mitchel Humpherys <mitchelh@...eaurora.org> wrote:

> printk is meant to be used with an associated log level. There are some
> instances of printk scattered around the mm code where the log level is
> missing. Add a log level and adhere to suggestions by
> scripts/checkpatch.pl by moving to the pr_* macros.
> 

hm, this is a functional change.

> --- a/mm/bounce.c
> +++ b/mm/bounce.c
> @@ -3,6 +3,8 @@
>   * - Split from highmem.c
>   */
>  
> +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

Because of this.

>  #include <linux/mm.h>
>  #include <linux/export.h>
>  #include <linux/swap.h>
> @@ -15,6 +17,7 @@
>  #include <linux/hash.h>
>  #include <linux/highmem.h>
>  #include <linux/bootmem.h>
> +#include <linux/printk.h>
>  #include <asm/tlbflush.h>
>  
>  #include <trace/events/block.h>
> @@ -34,7 +37,7 @@ static __init int init_emergency_pool(void)
>  
>  	page_pool = mempool_create_page_pool(POOL_SIZE, 0);
>  	BUG_ON(!page_pool);
> -	printk("bounce pool size: %d pages\n", POOL_SIZE);
> +	pr_info("bounce pool size: %d pages\n", POOL_SIZE);

This used to print "bounce pool size: N pages" but will now print
"bounce: bounce pool size: N pages".

It isn't necessarily a *bad* change but perhaps a little more thought
could be put into it.  In this example it would be better remove the
redundancy by using 

	pr_info("pool size: %d pages\n"...);

And all of this should be described and justified in the changelog,
please.


--
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