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:   Wed, 27 Mar 2019 02:49:02 -0700
From:   Joe Perches <joe@...ches.com>
To:     Leon Romanovsky <leon@...nel.org>
Cc:     "Rafael J . Wysocki" <rafael@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        x86 <x86@...nel.org>, "H. Peter Anvin" <hpa@...or.com>,
        linux-pm <linux-pm@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH -next v1] x86/apic: Reduce print level of CPU limit
 announcement

On Wed, 2019-03-27 at 11:38 +0200, Leon Romanovsky wrote:
> On Wed, Mar 27, 2019 at 02:17:40AM -0700, Joe Perches wrote:
> > On Wed, 2019-03-27 at 11:09 +0200, Leon Romanovsky wrote:
> > > Kernel is booted with less possible CPUs (possible_cpus kernel boot
> > > option) than available CPUs will have prints like this:
> > []
> > > diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
> > []
> > > @@ -2305,9 +2305,9 @@ int generic_processor_info(int apicid, int version)
> > >  	if (num_processors >= nr_cpu_ids) {
> > >  		int thiscpu = max + disabled_cpus;
> > > 
> > > -		pr_warning("APIC: NR_CPUS/possible_cpus limit of %i "
> > > -			   "reached. Processor %d/0x%x ignored.\n",
> > > -			   max, thiscpu, apicid);
> > > +		pr_debug(
> > > +			"APIC: NR_CPUS/possible_cpus limit of %i reached. Processor %d/0x%x ignored.\n",
> > > +			max, thiscpu, apicid);
> > 
> > 2 lines please
> > 
> > 		pr_debug("APIC: etc...",
> > 			 max, thiscpu, ...);
> 
> It was two lines before, but I changed for two reasons:
>  * It helped me to grep the source code to find the origin of dmesg warning.
>  * i got checkpatch warning about spitted string, can you please fix checkpatch do not complain?

Yes, use

	pr_debug("APIC: NR_CPUS/possible_cpus limit of %i reached. Processor %d/0x%x ignored.\n",
		 max, thiscpu, apicid);

or better

	printk(KERN_DEBUG "APIC: NR_CPUS/possible_cpus limit of %i reached. Processor %d/0x%x ignored.\n",
	       max, thiscpu, apicid);

> > And this would probably be better as
> > 
> > 		printk(KERN_DEBUG "APIC: etc...",
> > 		 ...)
> > 
> > to avoid the need to compile with DEBUG or enable
> > with CONFIG_DYNAMIC_DEBUG
> 
> You don't need anything like this, just provide dyndbg parameters
> through kernel command line.

That assumes CONFIG_DYNAMIC_DEBUG is always enabled,
and it is not enabled in many .config files.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ