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, 14 Jan 2009 10:25:44 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Sam Ravnborg <sam@...nborg.org>
Cc:	Robert Reif <reif@...thlink.net>,
	David Miller <davem@...emloft.net>,
	"sparclinux@...r.kernel.org" <sparclinux@...r.kernel.org>,
	mingo@...e.hu, linux-kernel@...r.kernel.org
Subject: Re: sparc32 compile error: redefinition of ‘smp_call_function_single’

On Wed, 14 Jan 2009 16:32:55 +0100 Sam Ravnborg <sam@...nborg.org> wrote:

> On Tue, Jan 13, 2009 at 11:59:40PM -0800, Andrew Morton wrote:
> > On Tue, 13 Jan 2009 22:38:01 -0500 Robert Reif <reif@...thlink.net> wrote:
> > 
> > > This worked:
> > > 
> > > diff --git a/kernel/Makefile b/kernel/Makefile
> > > index 2aebc4c..368227d 100644
> > > --- a/kernel/Makefile
> > > +++ b/kernel/Makefile
> > > @@ -43,8 +43,10 @@ obj-$(CONFIG_GENERIC_ISA_DMA) += dma.o
> > >  ifeq ($(CONFIG_USE_GENERIC_SMP_HELPERS),y)
> > >  obj-y += smp.o
> > >  else
> > > +ifneq ($(CONFIG_SMP),y)
> > >  obj-y += up.o
> > >  endif
> > > +endif
> > >  obj-$(CONFIG_SMP) += spinlock.o
> > >  obj-$(CONFIG_DEBUG_SPINLOCK) += spinlock.o
> > >  obj-$(CONFIG_PROVE_LOCKING) += spinlock.o
> > 
> > This all can be simplified, can't it?
> > 
> > obj-$(CONFIG_USE_GENERIC_SMP_HELPERS) += smp.o
> > ifneq ($(CONFIG_SMP),y)
> > obj-y += up.o
> > endif
> > 
> > (someone please check my homework - I don't have a good track
> > record here ;))
> 
> Looks correct. We pull in smp.o only for SPARC64 AND SMP

SPARC64=n and SMP, actually (assuming sparc64 is the only
USE_GENERIC_SMP_HELPERS=n arch)

> But I find the next lines distastefull in a Makefile:
> > ifneq ($(CONFIG_SMP),y)
> > obj-y += up.o
> > endif

me too.

> I would prefer a small Kconfig helper symbol:
> 
> config SPARC_UP
> 	def_bool y
> 	depends on !SMP
> 
> And then we would do the Makefile bits like this:
> obj-$(CONFIG_SPARC_UP) += up.o

eek.  Mentioning sparc explicitly in kernel/Makefile is badder.

we could remove zillions of these conditionals if something somewhere
were to generate negated symbols for us.  Say, when kbuild sees
CONFIG_SMP=y, it will generate another symbol: NOT_CONFIG_SMP=y.  So
then we can do

obj-$NOT_CONFIG_SMP += up.o

Or is that too cheesy?


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