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, 16 Mar 2010 15:54:02 +0900
From:	Tejun Heo <tj@...nel.org>
To:	Ingo Molnar <mingo@...e.hu>
CC:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	lkml <linux-kernel@...r.kernel.org>,
	Lee Schermerhorn <Lee.Schermerhorn@...com>,
	Christoph Lameter <cl@...ux-foundation.org>
Subject: Re: [RFC] remove implicit slab.h inclusion from percpu.h

Hello, Ingo.

On 03/16/2010 03:17 PM, Ingo Molnar wrote:
> ( /me mumbles something about not having a patch in the email to review and
>   pulling the tree. 200k patch is just fine for lkml - i've attached it below
>   for easier review. percpu.h and percpu.c has the meat of the changes. )

I wanted to keep the discussion high level while giving a general idea
about the extent of necessary changes.  I'll include the patch from
now on.

> i like the dependency reduction. Noticed one small detail:
> 
> this new 2000-lines #ifdef block percpu.c:
> 
>  +#ifdef CONFIG_SMP
>  +#else  /* CONFIG_SMP */
>  +#endif /* CONFIG_SMP */
> 
> feels a bit lame. A separate percpu_up.c file would be nicer i suppose?

Sure.

> Also, why should we make this opt-in and expose a wide range of configs to 
> build breakages? A more gradual approach would be to write a simple script 
> that adds a slab.h include to all .c's that include percpu.h, directly or 
> indirectly.
>
> You can map the pattern experimentally: the insertion pattern could be built 
> from the x86 allmodconfig build you did [i.e. extend the pattern until you 
> make it build on allmodconfig] - that would cover most cases in practice (not 
> just allmodconfig) - and would cover most architectures as well.

I don't really get the 'experimental' part but if I count all the
files which ends up including percpu.h directly or indirectly on
allmodconfig it ends up including much more .c files than necessasry -
11203 to be exact, ~20 times more than necessary.  Inclusions from .c
files definitely are much less troublesome so the situation would be
better than now but we'll still end up with a LOT of bogus inclusions
without any good way to eventually remove them.

Maybe a better way is to grab for slab API usages in .c files which
don't have slab.h inclusion.  If breaking the dependency is the way to
go, I can definitely write up some scripts and do test builds on some
archs.  There sure will be some fallouts but I think it won't be too
bad.

Thanks.

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