All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Moore <paul@paul-moore.com>
To: Fan Du <fan.du@windriver.com>
Cc: nicolas.dichtel@6wind.com,
	Hannes Frederic Sowa <hannes@stressinduktion.org>,
	davem@davemloft.net, yoshfuji@linux-ipv6.org, jmorris@namei.org,
	steffen.klassert@secunet.com, netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next v3] net: split rt_genid for ipv4 and ipv6
Date: Fri, 26 Jul 2013 14:09:50 -0400	[thread overview]
Message-ID: <1973541.1ksEzzDSut@sifl> (raw)
In-Reply-To: <51F20DEF.2090108@windriver.com>

On Friday, July 26, 2013 01:49:35 PM Fan Du wrote:
> I take a look at SELINUX xfrm part, my limited understanding SELINUX XFRM
> rule should take global effect on all net name space in current
> implementation.

Yes, a SELinux policy load needs to bump the cache ID as the new SELinux 
policy could have an affect on the IPsec state (SELinux label associated with 
the SAs and SPD rules).
 
> diff --git a/security/selinux/include/xfrm.h
> b/security/selinux/include/xfrm.h index 65f67cb..4f72d2c 100644
> --- a/security/selinux/include/xfrm.h
> +++ b/security/selinux/include/xfrm.h
> @@ -50,8 +50,14 @@ int selinux_xfrm_decode_session(struct sk_buff *skb, u32
> *sid, int ckall);
> 
>   static inline void selinux_xfrm_notify_policyload(void)
>   {
> +       struct net *net;
> +
>          atomic_inc(&flow_cache_genid);
> -       rt_genid_bump(&init_net);
> +       rtnl_lock();
> +       for_each_net(net) {
> +               rt_genid_bump_all(net);
> +       }
> +       rtnl_unlock();
>   }
>   #else
>   static inline int selinux_xfrm_enabled(void)

-- 
paul moore
www.paul-moore.com

      parent reply	other threads:[~2013-07-26 18:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-25  9:47 [PATCH net-next v3] net: split rt_genid for ipv4 and ipv6 Fan Du
2013-07-25 18:13 ` Hannes Frederic Sowa
2013-07-26  5:49   ` Fan Du
2013-07-26 14:43     ` Hannes Frederic Sowa
2013-07-26 18:09     ` Paul Moore [this message]

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=1973541.1ksEzzDSut@sifl \
    --to=paul@paul-moore.com \
    --cc=davem@davemloft.net \
    --cc=fan.du@windriver.com \
    --cc=hannes@stressinduktion.org \
    --cc=jmorris@namei.org \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.dichtel@6wind.com \
    --cc=steffen.klassert@secunet.com \
    --cc=yoshfuji@linux-ipv6.org \
    /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.