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: <20080509015223.GA30083@linux-sh.org>
Date:	Fri, 9 May 2008 10:52:23 +0900
From:	Paul Mundt <lethal@...ux-sh.org>
To:	Mike Travis <travis@....com>
Cc:	Adrian Bunk <bunk@...nel.org>, Ingo Molnar <mingo@...e.hu>,
	linux-sh@...r.kernel.org, linux-kernel@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>, ralf@...ux-mips.org
Subject: Re: sh migor_defconfig build breakage

On Thu, May 08, 2008 at 06:21:17PM -0700, Mike Travis wrote:
> Paul Mundt wrote:
> > On Thu, May 08, 2008 at 03:12:46PM -0700, Mike Travis wrote:
> >> Mike Travis wrote:
> >>> Because some arch's have it defined as an inline function.  Perhaps the
> >>> easiest would be to add to include/asm-sh/topology.h a simple define of
> >>> cpu_to_node()?
> >> Ahh, this is what caused the error.  In include/asm-generic/topology.h
> >> cpu_to_node is only defined now if NUMA is turned off.
> >>
> >> #ifndef CONFIG_NUMA
> >>
> >> /* Other architectures wishing to use this simple topology API should fill
> >>    in the below functions as appropriate in their own <asm/topology.h> file. */
> >> #ifndef cpu_to_node
> >> #define cpu_to_node(cpu)        ((void)(cpu),0)
> >> #endif
> >> ...
> >>
> >> So before my change arch 'sh' used the default define whether NUMA was
> >> set or not.
> >>
> > The dependency here is a bit vague in the first place. For UP NUMA the
> > asm-generic definitions are perfectly fine, it's only the CONFIG_NUMA &&
> > CONFIG_SMP cases where there is any point in doing anything more
> > fine-grained. So while it would be trivial to add a CONFIG_SMP test here
> > too, that's likely to break all of the other NUMA platforms.
> > 
> > So while sh can use the asm-generic definitions in the UP case, it
> > obviously can't on SMP. The easiest option for now is to just stub the
> > asm-generic bits in to asm-sh/topology.h under a CONFIG_NUMA ifdef and
> > then add more reasonable definitions for the SMP cases.
> 
> The "suggested" patch I submitted sort of covered all the cases of CONFIG_NUMA=y
> without regards to CONFIG_SMP.  It seems you're suggesting that I only change
> the asm-sh/topology.h file and leave the remaining arch's for "error discovery"
> later?
> 
If you want to solve it that way, it's fine as well. My point is simply
that the asm-generic/topology.h definitions are effectively only sane on
the UP case in the first place. Out of the platforms that do CONFIG_NUMA,
both sh and mips are currently broken due to the cpu_to_node() bits.

sh tends to be the odd one out in doing both UP and SMP NUMA, so I don't
mind doing this in asm-sh/topology.h either. mips is almost certainly
broken, but the generic cpu_to_node() isn't going to be sufficient there
anyways, so "error discovery" there will at least wake up anyone
interested in the broken platform. ip27 seems to be the only effected
platform there, though it's not obvious if NUMA depends on SMP or not in
that case.
--
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