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] [day] [month] [year] [list]
Message-ID: <20100928011206.GA5159@ericsson.com>
Date:	Mon, 27 Sep 2010 18:12:06 -0700
From:	Guenter Roeck <guenter.roeck@...csson.com>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
CC:	Pekka Enberg <penberg@...nel.org>, Ingo Molnar <mingo@...e.hu>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"lm-sensors@...sensors.org" <lm-sensors@...sensors.org>,
	Fenghua Yu <fenghua.yu@...el.com>,
	Jean Delvare <khali@...ux-fr.org>
Subject: Re: [PATCH v2] hwmon (coretemp): Fix build breakage if SMP is
 undefined

On Mon, Sep 27, 2010 at 09:00:59PM -0400, Linus Torvalds wrote:
> On Mon, Sep 27, 2010 at 5:26 PM, Guenter Roeck
> <guenter.roeck@...csson.com> wrote:
> >
> > Not that simple. cpu_sibling_mask()  is defined in asm/smp.h, which is only
> > included from linux/smp.h if SMP is defined. But many other files do include
> > asm/smp.h directly. This causes the following error all over the place
> > if CONFIG_SMP is not defined.
> 
> Yeah, that's broken.  Seriously broken.
> 
> And I guess that if you had happened to include <asm/smp.h> in
> coretemp.c you would magically have gotten that cpu_sibling_map()
> thing, and it would just work - by mistake.
> 
Figured.

> And maybe that's the correct (and really hacky) fix right now. Rather

Yes, that is actually what I am testing right now.

> than introduce an UP-only cpu_sibling_mask(), get the SMP version, and
> get it ignored.
> 
> Seriously broken, but there it is.
> 
> In the long run, I guess we should either
>  - disallow naked '<asm/smp.h>' includes
> OR
>  - just make '<linux/smp.h>' unconditionally include <asm/smp.h>
> 
> to at least not have that insane "some things exist in CONFIG_SMP or
> not depending on how you include files".
>

Guess so.

You should get another patch in a few minutes, after my next set of compiles is done.
I'll wait for some feedback before pushing it into my integration branch.

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