30 Mar, 2010
1 commit
-
…it slab.h inclusion from percpu.h
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.http://userweb.kernel.org/~tj/misc/slabh-sweep.py
The script does the followings.
* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.The conversion was done in the following steps.
1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.6. percpu.h was updated not to include slab.h.
7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
03 Mar, 2010
1 commit
-
When I merged the bundle creation code, I introduced a bogus
flowi value in the bundle. Instead of getting from the caller,
it was instead set to the flow in the route object, which is
totally different.The end result is that the bundles we created never match, and
we instead end up with an ever growing bundle list.Thanks to Jamal for find this problem.
Reported-by: Jamal Hadi Salim
Signed-off-by: Herbert Xu
Acked-by: Steffen Klassert
Acked-by: Jamal Hadi Salim
Signed-off-by: David S. Miller
01 Mar, 2010
1 commit
-
Conflicts:
drivers/firmware/iscsi_ibft.c
27 Feb, 2010
1 commit
-
* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (31 commits)
crypto: aes_generic - Fix checkpatch errors
crypto: fcrypt - Fix checkpatch errors
crypto: ecb - Fix checkpatch errors
crypto: des_generic - Fix checkpatch errors
crypto: deflate - Fix checkpatch errors
crypto: crypto_null - Fix checkpatch errors
crypto: cipher - Fix checkpatch errors
crypto: crc32 - Fix checkpatch errors
crypto: compress - Fix checkpatch errors
crypto: cast6 - Fix checkpatch errors
crypto: cast5 - Fix checkpatch errors
crypto: camellia - Fix checkpatch errors
crypto: authenc - Fix checkpatch errors
crypto: api - Fix checkpatch errors
crypto: anubis - Fix checkpatch errors
crypto: algapi - Fix checkpatch errors
crypto: blowfish - Fix checkpatch errors
crypto: aead - Fix checkpatch errors
crypto: ablkcipher - Fix checkpatch errors
crypto: pcrypt - call the complete function on error
...
24 Feb, 2010
1 commit
-
When we clone the SP, we should also clone the mark.
Useful for socket based SPs.Signed-off-by: Jamal Hadi Salim
Signed-off-by: David S. Miller
23 Feb, 2010
6 commits
-
Add ability for netlink userspace to manipulate the SPD
and manipulate the mark, retrieve it and get events with a defined
mark, etc.Signed-off-by: Jamal Hadi Salim
Signed-off-by: David S. Miller -
Add ability for netlink userspace to manipulate the SAD
and manipulate the mark, retrieve it and get events with a defined
mark.
MIGRATE may be added later.Signed-off-by: Jamal Hadi Salim
Signed-off-by: David S. Miller -
Allow mark to be used when doing SP lookup
Signed-off-by: Jamal Hadi Salim
Signed-off-by: David S. Miller -
pass mark to all SP lookups to prepare them for when we add code
to have them search.Signed-off-by: Jamal Hadi Salim
Signed-off-by: David S. Miller -
Allow mark to be added to the SA lookup
Signed-off-by: Jamal Hadi Salim
Signed-off-by: David S. Miller -
pass mark to all SA lookups to prepare them for when we add code
to have them search.Signed-off-by: Jamal Hadi Salim
Signed-off-by: David S. Miller
20 Feb, 2010
2 commits
-
To see the effect make sure you have an empty SPD.
On window1 "ip xfrm mon" and on window2 issue "ip xfrm policy flush"
You get prompt back in window2 and you see the flush event on window1.
With this fix, you still get prompt on window1 but no event on window2.Thanks to Alexey Dobriyan for finding a bug in earlier version
when using pfkey to do the flushing.Signed-off-by: Jamal Hadi Salim
Signed-off-by: David S. Miller -
To see the effect make sure you have an empty SAD.
On window1 "ip xfrm mon" and on window2 issue "ip xfrm state flush"
You get prompt back in window2 and you see the flush event on window1.
With this fix, you still get prompt on window1 but no event on window2.Thanks to Alexey Dobriyan for finding a bug in earlier version
when using pfkey to do the flushing.Signed-off-by: Jamal Hadi Salim
Signed-off-by: David S. Miller
19 Feb, 2010
1 commit
-
XFRMINHDRERROR counter is ambigous when validating forwarding
path. It makes it tricky to debug when you have both in and fwd
validation.Signed-off-by: Jamal Hadi Salim
Signed-off-by: David S. Miller
18 Feb, 2010
1 commit
-
As reported by Alexey Dobriyan:
--------------------
setkey now takes several seconds to run this simple script
and it spits "recv: Resource temporarily unavailable" messages.#!/usr/sbin/setkey -f
flush;
spdflush;add A B ipcomp 44 -m tunnel -C deflate;
add B A ipcomp 45 -m tunnel -C deflate;spdadd A B any -P in ipsec
ipcomp/tunnel/192.168.1.2-192.168.1.3/use;
spdadd B A any -P out ipsec
ipcomp/tunnel/192.168.1.3-192.168.1.2/use;
--------------------Obviously applications want the events even when the table
is empty. So we cannot make this behavioral change.Signed-off-by: David S. Miller
17 Feb, 2010
4 commits
-
Add __percpu sparse annotations to net.
These annotations are to make sparse consider percpu variables to be
in a different address space and warn if accessed without going
through percpu accessors. This patch doesn't affect normal builds.The macro and type tricks around snmp stats make things a bit
interesting. DEFINE/DECLARE_SNMP_STAT() macros mark the target field
as __percpu and SNMP_UPD_PO_STATS() macro is updated accordingly. All
snmp_mib_*() users which used to cast the argument to (void **) are
updated to cast it to (void __percpu **).Signed-off-by: Tejun Heo
Acked-by: David S. Miller
Cc: Patrick McHardy
Cc: Arnaldo Carvalho de Melo
Cc: Vlad Yasevich
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller -
Eric's version fixed it for pfkey. This one is for xfrm user.
I thought about amortizing those two get_acqseq()s but it seems
reasonable to have two of these sequence spaces for the two different
interfaces.cheers,
jamal
commit d5168d5addbc999c94aacda8f28a4a173756a72b
Author: Jamal Hadi Salim
Date: Tue Feb 16 06:51:22 2010 -0500xfrm: avoid spinlock in get_acqseq() used by xfrm user
This is in the same spirit as commit 28aecb9d7728dc26bf03ce7925fe622023a83a2a
by Eric Dumazet.
Use atomic_inc_return() in get_acqseq() to avoid taking a spinlockSigned-off-by: Jamal Hadi Salim
Acked-by: Eric DumazetSigned-off-by: David S. Miller
-
xfrm_state_clone calls kfree instead of xfrm_state_put to free
a failed state. Depending on the state of the failed state, it
can cause leaks to things like module references.All states should be freed by xfrm_state_put past the point of
xfrm_init_state.Signed-off-by: Herbert Xu
Signed-off-by: David S. Miller
16 Feb, 2010
2 commits
-
Observed similar behavior on SPD as previouly seen on SAD flushing..
This fixes it.cheers,
jamal
commit 428b20432dc31bc2e01a94cd451cf5a2c00d2bf4
Author: Jamal Hadi Salim
Date: Thu Feb 11 05:49:38 2010 -0500xfrm: Flushing empty SPD generates false events
To see the effect make sure you have an empty SPD.
On window1 "ip xfrm mon" and on window2 issue "ip xfrm policy flush"
You get prompt back in window1 and you see the flush event on window2.
With this fix, you still get prompt on window1 but no event on window2.Signed-off-by: Jamal Hadi Salim
Signed-off-by: David S. Miller
-
To see the effect make sure you have an empty SAD.
-On window1 "ip xfrm mon"
-on window2 issue "ip xfrm state flush"
You get prompt back in window1
and you see the flush event on window2.
With this fix, you still get prompt on window1 but no
event on window2.I was tempted to return -ESRCH on window1 (which would
show "RTNETLINK answers: No such process") but didnt want
to change current behavior.cheers,
jamal
commit 5f3dd4a772326166e1bcf54acc2391df00dc7ab5
Author: Jamal Hadi Salim
Date: Thu Feb 11 04:41:36 2010 -0500xfrm: Flushing empty SAD generates false events
To see the effect make sure you have an empty SAD.
On window1 "ip xfrm mon" and on window2 issue "ip xfrm state flush"
You get prompt back in window1 and you see the flush event on window2.
With this fix, you still get prompt on window1 but no event on window2.Signed-off-by: Jamal Hadi Salim
Signed-off-by: David S. Miller
13 Feb, 2010
1 commit
-
Some XFRM attributes were not going through basic validation.
Signed-off-by: Jamal Hadi Salim
Signed-off-by: David S. Miller
28 Jan, 2010
1 commit
25 Jan, 2010
1 commit
-
GC is non-existent in netns, so after you hit GC threshold, no new
dst entries will be created until someone triggers cleanup in init_net.Make xfrm4_dst_ops and xfrm6_dst_ops per-netns.
This is not done in a generic way, because it woule waste
(AF_MAX - 2) * sizeof(struct dst_ops) bytes per-netns.Reorder GC threshold initialization so it'd be done before registering
XFRM policies.Signed-off-by: Alexey Dobriyan
Signed-off-by: David S. Miller
24 Jan, 2010
1 commit
-
"ip xfrm state|policy count" report SA/SP count from init_net,
not from netns of caller process.Signed-off-by: Alexey Dobriyan
Signed-off-by: Herbert Xu
Signed-off-by: David S. Miller
23 Jan, 2010
1 commit
-
Signed-off-by: Alexey Dobriyan
Signed-off-by: David S. Miller
18 Jan, 2010
1 commit
-
__net_init/__net_exit are apparently not going away, so use them
to full extent.In some cases __net_init was removed, because it was called from
__net_exit code.Signed-off-by: Alexey Dobriyan
Signed-off-by: David S. Miller
17 Jan, 2010
1 commit
-
This patch adds the RFC4543 (GMAC) wrapper for GCM similar to the
existing RFC4106 wrapper. The main differences between GCM and GMAC are
the contents of the AAD and that the plaintext is empty for the latter.Signed-off-by: Tobias Brunner
Signed-off-by: Herbert Xu
27 Dec, 2009
1 commit
-
Signed-off-by: Ralf Baechle
net/xfrm/xfrm_policy.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
Signed-off-by: David S. Miller
08 Dec, 2009
1 commit
-
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1815 commits)
mac80211: fix reorder buffer release
iwmc3200wifi: Enable wimax core through module parameter
iwmc3200wifi: Add wifi-wimax coexistence mode as a module parameter
iwmc3200wifi: Coex table command does not expect a response
iwmc3200wifi: Update wiwi priority table
iwlwifi: driver version track kernel version
iwlwifi: indicate uCode type when fail dump error/event log
iwl3945: remove duplicated event logging code
b43: fix two warnings
ipw2100: fix rebooting hang with driver loaded
cfg80211: indent regulatory messages with spaces
iwmc3200wifi: fix NULL pointer dereference in pmkid update
mac80211: Fix TX status reporting for injected data frames
ath9k: enable 2GHz band only if the device supports it
airo: Fix integer overflow warning
rt2x00: Fix padding bug on L2PAD devices.
WE: Fix set events not propagated
b43legacy: avoid PPC fault during resume
b43: avoid PPC fault during resume
tcp: fix a timewait refcnt race
...Fix up conflicts due to sysctl cleanups (dead sysctl_check code and
CTL_UNNUMBERED removed) in
kernel/sysctl_check.c
net/ipv4/sysctl_net_ipv4.c
net/ipv6/addrconf.c
net/sctp/sysctl.c
04 Dec, 2009
1 commit
-
xfrm.nlsk is provided by the xfrm_user module and is access via rcu from
other parts of the xfrm code. Add xfrm.nlsk_stash a copy of xfrm.nlsk that
will never be set to NULL. This allows the synchronize_net and
netlink_kernel_release to be deferred until a whole batch of xfrm.nlsk sockets
have been set to NULL.Signed-off-by: Eric W. Biederman
Signed-off-by: David S. Miller
02 Dec, 2009
2 commits
-
Conflicts:
net/mac80211/ht.c -
can not add camellia cipher algorithm when using "ip xfrm state" command.
Signed-off-by: Li Yewang
Signed-off-by: David S. Miller
26 Nov, 2009
2 commits
-
These algorithms use a truncation of 192/256 bits, as specified
in RFC4868.Signed-off-by: Martin Willi
Acked-by: Herbert Xu
Signed-off-by: David S. Miller -
Adding a xfrm_state requires an authentication algorithm specified
either as xfrm_algo or as xfrm_algo_auth with a specific truncation
length. For compatibility, both attributes are dumped to userspace,
and we also accept both attributes, but prefer the new syntax.If no truncation length is specified, or the authentication algorithm
is specified using xfrm_algo, the truncation length from the algorithm
description in the kernel is used.Signed-off-by: Martin Willi
Signed-off-by: David S. Miller
12 Nov, 2009
1 commit
-
Now that sys_sysctl is a compatiblity wrapper around /proc/sys
all sysctl strategy routines, and all ctl_name and strategy
entries in the sysctl tables are unused, and can be
revmoed.In addition neigh_sysctl_register has been modified to no longer
take a strategy argument and it's callers have been modified not
to pass one.Cc: "David Miller"
Cc: Hideaki YOSHIFUJI
Cc: netdev@vger.kernel.org
Signed-off-by: Eric W. Biederman
09 Nov, 2009
1 commit
-
This fixes the following bug in the current implementation of
net/xfrm: SAD entries timeouts do not count the time spent by the machine
in the suspended state. This leads to the connectivity problems because
after resuming local machine thinks that the SAD entry is still valid, while
it has already been expired on the remote server.The cause of this is very simple: the timeouts in the net/xfrm are bound to
the old mod_timer() timers. This patch reassigns them to the
CLOCK_REALTIME hrtimer.I have been using this version of the patch for a few months on my
machines without any problems. Also run a few stress tests w/o any
issues.This version of the patch uses tasklet_hrtimer by Peter Zijlstra
(commit 9ba5f0).This patch is against 2.6.31.4. Please CC me.
Signed-off-by: Yury Polyanskiy
Signed-off-by: David S. Miller
19 Oct, 2009
1 commit
-
The last users of skb_icv_walk are converted to ahash now,
so skb_icv_walk is unused and can be removed.Signed-off-by: Steffen Klassert
Signed-off-by: David S. Miller
02 Sep, 2009
1 commit
-
All instances of file_operations should be const.
Signed-off-by: Stephen Hemminger
Signed-off-by: David S. Miller
10 Aug, 2009
1 commit
-
This patch fixes hash collisions in cases where number
of entries have incrementing IP source and destination addresses
from single respective subnets (i.e. 192.168.0.1-172.16.0.1,
192.168.0.2-172.16.0.2, and so on.).Signed-off-by: Jussi Maki
Signed-off-by: David S. Miller