From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Paul Moore <pmoore@redhat.com>
Cc: netdev@vger.kernel.org, selinux@tycho.nsa.gov, omoris@redhat.com,
pwouters@redhat.com
Subject: Re: [RFC PATCH 2/2] xfrm: force a garbage collection after deleting a policy
Date: Thu, 23 May 2013 23:29:58 +0400 [thread overview]
Message-ID: <519E6E36.4070600@cogentembedded.com> (raw)
In-Reply-To: <20130523190746.19212.6027.stgit@localhost>
Hello.
On 05/23/2013 11:07 PM, Paul Moore wrote:
> In some cases after deleting a policy from the SPD the policy would
> remain in the dst/flow/route cache for an extended period of time
> which caused problems for SELinux as its dynamic network access
> controls key off of the number of XFRM policy and state entries.
> This patch corrects this problem by forcing a XFRM garbage collection
> whenever a policy is sucessfully removed.
>
> Reported-by: Ondrej Moris <omoris@redhat.com>
> Signed-off-by: Paul Moore <pmoore@redhat.com>
> ---
> include/net/xfrm.h | 6 ++++++
> net/key/af_key.c | 4 ++++
> net/xfrm/xfrm_policy.c | 3 ++-
> net/xfrm/xfrm_user.c | 2 ++
> 4 files changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/include/net/xfrm.h b/include/net/xfrm.h
> index ae16531..918e4cd 100644
> --- a/include/net/xfrm.h
> +++ b/include/net/xfrm.h
[...]
> @@ -1194,6 +1196,10 @@ static inline int xfrm6_policy_check_reverse(struct sock *sk, int dir,
> {
> return 1;
> }
> +static inline void xfrm_garbage_collect(struct net *net)
> +{
> + return;
Not needed.
> +}
> #endif
>
> static __inline__
>
WBR, Sergei
next prev parent reply other threads:[~2013-05-23 19:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-23 19:07 [RFC PATCH 0/2] Fix the SELinux dynamic network access controls Paul Moore
2013-05-23 19:07 ` Paul Moore
2013-05-23 19:07 ` [RFC PATCH 1/2] selinux: fix the labeled xfrm/IPsec reference count handling Paul Moore
2013-05-23 19:07 ` Paul Moore
2013-05-23 19:07 ` [RFC PATCH 2/2] xfrm: force a garbage collection after deleting a policy Paul Moore
2013-05-23 19:07 ` Paul Moore
2013-05-23 19:29 ` Sergei Shtylyov [this message]
2013-05-23 20:26 ` Paul Moore
2013-05-23 20:26 ` Paul Moore
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=519E6E36.4070600@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=netdev@vger.kernel.org \
--cc=omoris@redhat.com \
--cc=pmoore@redhat.com \
--cc=pwouters@redhat.com \
--cc=selinux@tycho.nsa.gov \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.