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: <070d253e718c1a6d72fb52c1d2f02ec461d825a1.camel@perches.com>
Date:   Fri, 07 Oct 2022 00:09:26 -0700
From:   Joe Perches <joe@...ches.com>
To:     Ray Zhang <sgzhang@...gle.com>,
        Miquel Raynal <miquel.raynal@...tlin.com>,
        Richard Weinberger <richard@....at>,
        Vignesh Raghavendra <vigneshr@...com>
Cc:     linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/3] mtd: mtdoops: change printk() to counterpart pr_
 functions

On Fri, 2022-10-07 at 06:50 +0000, Ray Zhang wrote:
> To comply with latest kernel code requirement, change printk() to
> counterpart pr_ functions in mtdoops driver:
> - change printk(INFO) to pr_info()
> - change printk(DEBUG) to pr_debug()

There is a different behavior with printk(KERN_DEBUG to pr_debug(
as pr_debug is a no-op unless dynamic debugging is enabled or
DEBUG is defined.

And even with dynamic_debug, the output is default disabled unless
DEBUG is defined.

As is, printk(KERN_DEBUG is emitted unless the console level is low.

> diff --git a/drivers/mtd/mtdoops.c b/drivers/mtd/mtdoops.c
[]
> @@ -120,8 +120,8 @@ static void mtdoops_inc_counter(struct mtdoops_context *cxt)
>  		return;
>  	}
>  
> -	printk(KERN_DEBUG "mtdoops: ready %d, %d (no erase)\n",
> -	       cxt->nextpage, cxt->nextcount);
> +	pr_debug("mtdoops: ready %d, %d (no erase)\n",
> +		 cxt->nextpage, cxt->nextcount);
>  }

etc...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ