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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 27 Feb 2014 08:20:42 -0800
From:	Josh Triplett <josh@...htriplett.org>
To:	Toshi Kani <toshi.kani@...com>
Cc:	Rashika Kheria <rashika.kheria@...il.com>,
	linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
	Borislav Petkov <bp@...en8.de>,
	Prarit Bhargava <prarit@...hat.com>,
	Paul Gortmaker <paul.gortmaker@...driver.com>,
	Andrew Jones <drjones@...hat.com>,
	"Srivatsa S. Bhat" <srivatsa.bhat@...ux.vnet.ibm.com>,
	"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
	"Robert P. J. Day" <rpjday@...shcourse.ca>,
	Sudeep KarkadaNagesha <sudeep.karkadanagesha@....com>,
	David Miller <davem@...emloft.net>
Subject: Re: [PATCH 03/46] kernel: Move prototype declaration to header file
 include/linux/cpu.h

On Thu, Feb 27, 2014 at 08:04:29AM -0700, Toshi Kani wrote:
> On Thu, 2014-02-27 at 16:42 +0530, Rashika Kheria wrote:
> > Add prototype declaration to header file include/linux/cpu.h because
> > they are used by more than one file.
> > 
> > This eliminates the following warning in kernel/cpu.c:
> > kernel/cpu.c:512:13: warning: no previous prototype for ‘arch_enable_nonboot_cpus_begin’ [-Wmissing-prototypes]
> > kernel/cpu.c:516:13: warning: no previous prototype for ‘arch_enable_nonboot_cpus_end’ [-Wmissing-prototypes]
> > 
> > Signed-off-by: Rashika Kheria <rashika.kheria@...il.com>
> > Reviewed-by: Josh Triplett <josh@...htriplett.org>
> > ---
> >  arch/x86/kernel/smpboot.c |    1 +
> >  include/linux/cpu.h       |    2 ++
> >  2 files changed, 3 insertions(+)
> > 
> > diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
> > index a32da80..e428764 100644
> > --- a/arch/x86/kernel/smpboot.c
> > +++ b/arch/x86/kernel/smpboot.c
> > @@ -49,6 +49,7 @@
> >  #include <linux/bootmem.h>
> >  #include <linux/err.h>
> >  #include <linux/nmi.h>
> > +#include <linux/cpu.h>
> >  #include <linux/tboot.h>
> >  #include <linux/stackprotector.h>
> >  #include <linux/gfp.h>
> > diff --git a/include/linux/cpu.h b/include/linux/cpu.h
> > index 03e235ad..9f633b0 100644
> > --- a/include/linux/cpu.h
> > +++ b/include/linux/cpu.h
> > @@ -38,6 +38,8 @@ extern void cpu_remove_dev_attr(struct device_attribute *attr);
> >  
> >  extern int cpu_add_dev_attr_group(struct attribute_group *attrs);
> >  extern void cpu_remove_dev_attr_group(struct attribute_group *attrs);
> > +void arch_enable_nonboot_cpus_begin(void);
> > +void arch_enable_nonboot_cpus_end(void);
> 
> Can we simply include linux/smp.h, which defines them already?

Ah, looks like those prototypes were only added to linux/smp.h very
recently, to fix this exact issue, in:

commit fb37bb04d6c8d6c44e61d9da189dcfa6aa0f135e
Author: Paul Gortmaker <paul.gortmaker@...driver.com>
Date:   Mon Feb 10 14:25:49 2014 -0800

    smp.h: fix x86+cpu.c sparse warnings about arch nonboot CPU calls

    Use what we already do for arch_disable_smp_support() to fix these:

      arch/x86/kernel/smpboot.c:1155:6: warning: symbol 'arch_enable_nonboot_cpus_begin' was not declared. Should it be static?
      arch/x86/kernel/smpboot.c:1160:6: warning: symbol 'arch_enable_nonboot_cpus_end' was not declared. Should it be static?
      kernel/cpu.c:512:13: warning: symbol 'arch_enable_nonboot_cpus_begin' was not declared. Should it be static?
      kernel/cpu.c:516:13: warning: symbol 'arch_enable_nonboot_cpus_end' was not declared. Should it be static?
--
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