Thread (35 messages) 35 messages, 3 authors, 2010-03-31

Re: [PATCH 1/7] xfrm: remove policy lock when accessing policy->walk.dead

From: Timo Teräs <hidden>
Date: 2010-03-30 13:33:55

Herbert Xu wrote:
On Tue, Mar 30, 2010 at 03:41:02PM +0300, Timo Teräs wrote:
quoted
So it'd make more sense to nuke the hashes entirely for
per-socket policies?
Absolutely.
I checked now the xfrm_user, and mostly it seems to prevent
modification to per-socket policies.

The only exception is XFRM_MSG_POLEXPIRE handler
xfrm_add_pol_expire(). It calls xfrm_policy_byid() without
verifying the direction, and can thus complete successfully on
a per-socket policy. This can actually result in per-socket
policy deletion via netlink.

I guess the proper thing is to add the direction check there.

It also seems that the by-index hash is also used when
generating new index. It's to double check that the index
is unique. So deleting the by-index hash from per-socket
policies seems tricky.

Removing bydst hashing should be trivial.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help