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:	Tue, 27 Jan 2009 09:33:37 -0600
From:	James Bottomley <James.Bottomley@...senPartnership.com>
To:	Tejun Heo <htejun@...il.com>
Cc:	Ingo Molnar <mingo@...e.hu>, Brian Gerst <brgerst@...il.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2 #tj-percpu] x86: fix build breakage on voyage

On Tue, 2009-01-27 at 20:47 +0900, Tejun Heo wrote:
> Hello, Ingo.
> 
> Ingo Molnar wrote:
> >> +#ifdef CONFIG_X86_LOCAL_APIC
> >>  	early_per_cpu_ptr(x86_cpu_to_apicid) = NULL;
> >>  	early_per_cpu_ptr(x86_bios_cpu_apicid) = NULL;
> >> +#endif
> > 
> > That patch is not acceptable - it is ugly and it adds another set of
> > #ifdefs to an already complex piece of code.
> 
> Well, although the patch itself does add #ifdef, if you look over the
> whole series, voyager is now a much more conforming citizen in the x86
> world.  There are several solutions to this particular one.
> 
> 1. Just let apic stuff defined and not use it in voyager if the ifdef
>    is disturbing.  IIUC, apic isn't used in voyager at all, right?
> 
> 2. Clean up early percpu stuff so that it each early percpu variable
>    doesn't need to be explicitly copied and cleared, which is the
>    actual problem here.

Right ... there's a variant of this where the copying and clearing is
done within the actual file that defines the variable (i.e. a hook
approach).

> 3. But, then again, the current interim and ugly way of doing it isn't
>    too bad considering the small number of early per cpu users.
> 
> To me the current form doesn't look too bad but if it's too ugly,
> maybe doing #2 is not such a bad idea such that early percpu can be
> transferred to percpu in more systematic way.  It still feels a bit
> like overdoing it tho.
> 
> What do you think?

What's the actual goal of setup_percpu.c?  To have a single location for
all the per_cpu initialisation?  If so then it's hard to get away from
all the ifdefs.  If there are alternative ways of arranging the file
then I think splitting some of the conditional pieces into other files
would work.

James


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