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:	Mon, 29 Dec 2008 15:56:30 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Eduard - Gabriel Munteanu <eduard.munteanu@...ux360.ro>
Cc:	Pekka Enberg <penberg@...helsinki.fi>,
	Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>,
	Dipankar Sarma <dipankar@...ibm.com>,
	Alexey Dobriyan <adobriyan@...il.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] RCU: Move some definitions to minimal headers.


* Eduard - Gabriel Munteanu <eduard.munteanu@...ux360.ro> wrote:

> linux/rcupdate.h used to include SLAB headers, which got in the way of 
> switching kmemtrace to use tracepoints instead of markers. The circular 
> header inclusion pattern that appeared was making it impossible to use 
> tracepoints in SLAB allocator inlines.
> 
> This moves some header code into separate files. As an added bonus, 
> preprocessing is faster if care is taken to use these minimal headers, 
> since no effort is spent on including SLAB headers.
> 
> Signed-off-by: Eduard - Gabriel Munteanu <eduard.munteanu@...ux360.ro>
> ---
>  include/linux/rcuclassic.h     |   40 +--------
>  include/linux/rcuclassic_min.h |   77 +++++++++++++++
>  include/linux/rcupdate.h       |  160 +-------------------------------
>  include/linux/rcupdate_min.h   |  205 ++++++++++++++++++++++++++++++++++++++++
>  include/linux/rcupreempt.h     |   32 +------
>  include/linux/rcupreempt_min.h |   68 +++++++++++++
>  6 files changed, 353 insertions(+), 229 deletions(-)
>  create mode 100644 include/linux/rcuclassic_min.h
>  create mode 100644 include/linux/rcupdate_min.h
>  create mode 100644 include/linux/rcupreempt_min.h

ok, i like the idea - i'm just not sure this is the best approach. If we 
want to do a splitup, it should be along the lines of spinlock.h and 
spinlock_types.h.

The principle there is that the type declarations and inline function 
definitions kept separate. The 'type' headers are lightweight with minimal 
dependencies - the 'inline function' headers are more heavyweight.

For RCU ... cannot we get away much simpler, by removing the headers from 
rcupdate.h that cause the SLAB dependency hell? Does rcupdate.h really 
need to include all of:

 #include <linux/cache.h>
 #include <linux/spinlock.h>
 #include <linux/threads.h>
 #include <linux/percpu.h>
 #include <linux/cpumask.h>
 #include <linux/seqlock.h>
 #include <linux/lockdep.h>
 #include <linux/completion.h>

AFAICS it should be able to get away with spinlock_types.h and i'm not 
sure it needs cache.h. The other headers are 'data type' headers mostly.

Which one is causing the trouble for you - cache.h ? If you do a patch 
that removes that trouble include file i can make wide build coverage 
tests to make sure it's OK to remove it.

but rcu_types.h would be nice to have too - i'm just not sure it's really 
what you need. (you seem to need certain RCU functions too, right?)

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