<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://permalink.gmane.org/gmane.linux.kernel.containers">
    <title>gmane.linux.kernel.containers</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.containers</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.containers/26271"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.containers/26270"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.containers/26269"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.containers/26268"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.containers/26267"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.containers/26266"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.containers/26265"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.containers/26264"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.containers/26263"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.containers/26262"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.containers/26261"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.containers/26260"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.containers/26259"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.containers/26258"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.containers/26257"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.containers/26256"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.containers/26255"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.containers/26254"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.containers/26253"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.kernel.containers/26252"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.containers/26271">
    <title>Re: [PATCH ] cgroup: rename cont to cgrp</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.containers/26271</link>
    <description>&lt;pre&gt;
Oops, I thought I applied this one.  Apparently not.


Applied to cgroup/for-3.11.

Thanks.

&lt;/pre&gt;</description>
    <dc:creator>Tejun Heo</dc:creator>
    <dc:date>2013-06-19T08:23:47</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.containers/26270">
    <title>[PATCH 19/22] Audit: pass proper user namespace toaudit_log_common_recv_msg</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.containers/26270</link>
    <description>&lt;pre&gt;The audit log that generated in user namespace should be
received by the auditd running in this user namespace.

Signed-off-by: Gao feng &amp;lt;gaofeng-BthXqXjhjHXQFUHtdCDX3A&amp;lt; at &amp;gt;public.gmane.org&amp;gt;
---
 kernel/audit.c | 26 ++++++++++++++------------
 1 file changed, 14 insertions(+), 12 deletions(-)

diff --git a/kernel/audit.c b/kernel/audit.c
index 5d3764c..2d81aac 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -624,17 +624,18 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int audit_netlink_ok(struct sk_buff *skb, u16 msg_type)
 return err;
 }
 
-static int audit_log_common_recv_msg(struct audit_buffer **ab, u16 msg_type)
+static int audit_log_common_recv_msg(struct user_namespace *ns,
+     struct audit_buffer **ab, u16 msg_type)
 {
 int rc = 0;
-uid_t uid = from_kuid(&amp;amp;init_user_ns, current_uid());
+uid_t uid = from_kuid(ns, current_uid());
 
-if (!audit_enabled_ns(&amp;amp;init_user_ns)) {
+if (!audit_enabled_ns(ns)) {
 *ab = NULL;
 return rc;
 }
 
-*ab = audit_log_start(NULL, GFP_KERNEL, msg_type);
+*ab = audit_log_start_ns(ns, NULL, GF&lt;/pre&gt;</description>
    <dc:creator>Gao feng</dc:creator>
    <dc:date>2013-06-19T01:53:51</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.containers/26269">
    <title>[PATCH 22/22] Audit: Allow GET, SET,USER MSG operations in uninit user namespace</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.containers/26269</link>
    <description>&lt;pre&gt;After this patch, user can set/get audit informations
in container, and they can also send user msg to the
audit subsystem.

Signed-off-by: Gao feng &amp;lt;gaofeng-BthXqXjhjHXQFUHtdCDX3A&amp;lt; at &amp;gt;public.gmane.org&amp;gt;
---
 kernel/audit.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/kernel/audit.c b/kernel/audit.c
index 0b3fd8b..1b60a5a 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -594,11 +594,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int audit_netlink_ok(struct sk_buff *skb, u16 msg_type)
 {
 int err = 0;
 
-/* Only support the initial namespaces for now. */
-if ((current_user_ns() != &amp;amp;init_user_ns) ||
-    (task_active_pid_ns(current) != &amp;amp;init_pid_ns))
-return -EPERM;
-
 switch (msg_type) {
 case AUDIT_LIST:
 case AUDIT_ADD:
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -606,6 +601,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int audit_netlink_ok(struct sk_buff *skb, u16 msg_type)
 return -EOPNOTSUPP;
 case AUDIT_GET:
 case AUDIT_SET:
+break;
 case AUDIT_LIST_RULES:
 case AUDIT_ADD_RULE:
 case AUDIT_DEL_RULE:
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -614,13 +610,17 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int audit_netlink_ok(struct sk&lt;/pre&gt;</description>
    <dc:creator>Gao feng</dc:creator>
    <dc:date>2013-06-19T01:53:54</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.containers/26268">
    <title>[PATCH 20/22] Audit: Log audit config change in uninit user namespace</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.containers/26268</link>
    <description>&lt;pre&gt;This patch allow to log audit config change in
uninit user namespace.

Signed-off-by: Gao feng &amp;lt;gaofeng-BthXqXjhjHXQFUHtdCDX3A&amp;lt; at &amp;gt;public.gmane.org&amp;gt;
---
 kernel/audit.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/kernel/audit.c b/kernel/audit.c
index 2d81aac..84a882c 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -245,13 +245,14 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void audit_log_lost(const char *message)
 }
 }
 
-static int audit_log_config_change(char *function_name, int new, int old,
+static int audit_log_config_change(struct user_namespace *ns,
+   char *function_name, int new, int old,
    int allow_changes)
 {
 struct audit_buffer *ab;
 int rc = 0;
 
-ab = audit_log_start(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE);
+ab = audit_log_start_ns(ns, NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE);
 if (unlikely(!ab))
 return rc;
 audit_log_format(ab, "%s=%d old=%d", function_name, new, old);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -260,7 +261,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int audit_log_config_change(char *function_name, int new, int old,
 if (rc)
 al&lt;/pre&gt;</description>
    <dc:creator>Gao feng</dc:creator>
    <dc:date>2013-06-19T01:53:52</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.containers/26267">
    <title>[PATCH 21/22] Audit: send reply message to the auditd in proper usernamespace</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.containers/26267</link>
    <description>&lt;pre&gt;We can send the audit reply message to userspace auditd
process which running in the same user namespace with the
process which send the audit request message to kernel.

Signed-off-by: Gao feng &amp;lt;gaofeng-BthXqXjhjHXQFUHtdCDX3A&amp;lt; at &amp;gt;public.gmane.org&amp;gt;
---
 kernel/audit.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/kernel/audit.c b/kernel/audit.c
index 84a882c..0b3fd8b 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -146,6 +146,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct audit_buffer {
 struct audit_reply {
 int pid;
 struct sk_buff *skb;
+struct user_namespace *ns;
 };
 
 static void audit_set_pid(struct audit_buffer *ab, pid_t pid)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -532,8 +533,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int audit_send_reply_thread(void *arg)
 
 /* Ignore failure. It'll only happen if the sender goes away,
    because our timeout is set to infinite. */
-netlink_unicast(init_user_ns.audit.sock, reply-&amp;gt;skb,
+netlink_unicast(reply-&amp;gt;ns-&amp;gt;audit.sock, reply-&amp;gt;skb,
 reply-&amp;gt;pid, 0);
+put_user_ns(reply-&amp;gt;ns);
 kfree(reply);
 return 0;
 }
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -572,11 +574,1&lt;/pre&gt;</description>
    <dc:creator>Gao feng</dc:creator>
    <dc:date>2013-06-19T01:53:53</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.containers/26266">
    <title>[PATCH 17/22] Audit: make audit_backlog_wait per user namespace</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.containers/26266</link>
    <description>&lt;pre&gt;Tasks are added to audit_backlog_wait when the
audit_skb_queue of user namespace is full, so
audit_backlog_wait should be per user namespace too.

Signed-off-by: Gao feng &amp;lt;gaofeng-BthXqXjhjHXQFUHtdCDX3A&amp;lt; at &amp;gt;public.gmane.org&amp;gt;
---
 include/linux/user_namespace.h |  1 +
 kernel/audit.c                 | 11 +++++------
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h
index 28938f3..c186a84 100644
--- a/include/linux/user_namespace.h
+++ b/include/linux/user_namespace.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -29,6 +29,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct audit_ctrl {
 struct sk_buff_headhold_queue;
 struct task_struct*kauditd_task;
 wait_queue_head_tkauditd_wait;
+wait_queue_head_tbacklog_wait;
 boolever_enabled;
 };
 #endif
diff --git a/kernel/audit.c b/kernel/audit.c
index e3d7da7..3dcaa97 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -119,8 +119,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static DEFINE_SPINLOCK(audit_freelist_lock);
 static int   audit_freelist_count;
 static LIST_HEAD(audit_freelist);
 
-static DEC&lt;/pre&gt;</description>
    <dc:creator>Gao feng</dc:creator>
    <dc:date>2013-06-19T01:53:49</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.containers/26265">
    <title>[PATCH 18/22] Audit: introduce new audit logging interface for usernamespace</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.containers/26265</link>
    <description>&lt;pre&gt;This interface audit_log_start_ns and audit_log_end_ns
will be used for logging audit logs in user namespace.

Signed-off-by: Gao feng &amp;lt;gaofeng-BthXqXjhjHXQFUHtdCDX3A&amp;lt; at &amp;gt;public.gmane.org&amp;gt;
---
 include/linux/audit.h | 25 ++++++++++++--
 kernel/audit.c        | 95 ++++++++++++++++++++++++++++++---------------------
 2 files changed, 78 insertions(+), 42 deletions(-)

diff --git a/include/linux/audit.h b/include/linux/audit.h
index cc30db9..b64f268 100644
--- a/include/linux/audit.h
+++ b/include/linux/audit.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -404,10 +404,18 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; extern __printf(4, 5)
 void audit_log(struct audit_context *ctx, gfp_t gfp_mask, int type,
        const char *fmt, ...);
 
-extern struct audit_buffer *audit_log_start(struct audit_context *ctx, gfp_t gfp_mask, int type);
+extern struct audit_buffer *
+audit_log_start(struct audit_context *ctx, gfp_t gfp_mask, int type);
+
+extern struct audit_buffer *
+audit_log_start_ns(struct user_namespace *ns, struct audit_context *ctx,
+   gfp_t gfp_mask, int type);
+
 extern __printf(2, 3)
 v&lt;/pre&gt;</description>
    <dc:creator>Gao feng</dc:creator>
    <dc:date>2013-06-19T01:53:50</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.containers/26264">
    <title>[PATCH 13/22] Audit: only allow init user namespace to change ratelimit</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.containers/26264</link>
    <description>&lt;pre&gt;Because We want to avoid the DoS attack caused by other user
namespace,so don't make audit_rate_limit per user namespace.
And only init user namespace has rights to change it.

Signed-off-by: Gao feng &amp;lt;gaofeng-BthXqXjhjHXQFUHtdCDX3A&amp;lt; at &amp;gt;public.gmane.org&amp;gt;
---
 kernel/audit.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/kernel/audit.c b/kernel/audit.c
index 0b9cef2..306231d 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -295,6 +295,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int audit_do_config_change(char *function_name, int *to_change, int new)
 
 static int audit_set_rate_limit(int limit)
 {
+if (current_user_ns() != &amp;amp;init_user_ns)
+return -EPERM;
+
 return audit_do_config_change("audit_rate_limit", &amp;amp;audit_rate_limit, limit);
 }
 
&lt;/pre&gt;</description>
    <dc:creator>Gao feng</dc:creator>
    <dc:date>2013-06-19T01:53:45</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.containers/26263">
    <title>[PATCH 12/22] Audit: make audit_initialized per user namespace</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.containers/26263</link>
    <description>&lt;pre&gt;audit_initialized is used to identify if the audit
related resources have been initialized. it should
be per user namespace too.

Signed-off-by: Gao feng &amp;lt;gaofeng-BthXqXjhjHXQFUHtdCDX3A&amp;lt; at &amp;gt;public.gmane.org&amp;gt;
---
 include/linux/user_namespace.h |  1 +
 kernel/audit.c                 | 21 +++++++++++----------
 2 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h
index a2c0a79..c665569 100644
--- a/include/linux/user_namespace.h
+++ b/include/linux/user_namespace.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -21,6 +21,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct uid_gid_map {/* 64 bytes -- 1 cache line */
 #ifdef CONFIG_AUDIT
 struct audit_ctrl {
 struct sock*sock;
+intinitialized;
 intenabled;
 intpid;
 intportid;
diff --git a/kernel/audit.c b/kernel/audit.c
index 923fe27..0b9cef2 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -68,12 +68,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
 #include "audit.h"
 
-/* No auditing will take place until audit_initialized == AUDIT_INITIALIZED.
+/* No auditing will take place until user &lt;/pre&gt;</description>
    <dc:creator>Gao feng</dc:creator>
    <dc:date>2013-06-19T01:53:44</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.containers/26262">
    <title>[PATCH 16/22] Audit: make kauditd_wait per user namespace</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.containers/26262</link>
    <description>&lt;pre&gt;kauditd_task is added to the wait queue kaudit_wait when
there is no audit message being generated in user namespace,
so the kaudit_wait should be per user namespace too.

Signed-off-by: Gao feng &amp;lt;gaofeng-BthXqXjhjHXQFUHtdCDX3A&amp;lt; at &amp;gt;public.gmane.org&amp;gt;
---
 include/linux/user_namespace.h |  1 +
 kernel/audit.c                 | 36 ++++++++++++++++++------------------
 2 files changed, 19 insertions(+), 18 deletions(-)

diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h
index c665569..28938f3 100644
--- a/include/linux/user_namespace.h
+++ b/include/linux/user_namespace.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -28,6 +28,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct audit_ctrl {
 struct sk_buff_headqueue;
 struct sk_buff_headhold_queue;
 struct task_struct*kauditd_task;
+wait_queue_head_tkauditd_wait;
 boolever_enabled;
 };
 #endif
diff --git a/kernel/audit.c b/kernel/audit.c
index 297ac6e..e3d7da7 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -119,7 +119,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static DEFINE_SPINLOCK(audit_freelist_lock);
 static int   audit_freelist_count;
 &lt;/pre&gt;</description>
    <dc:creator>Gao feng</dc:creator>
    <dc:date>2013-06-19T01:53:48</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.containers/26261">
    <title>[PATCH 15/22] Audit: only allow init user namespace to changebacklog_limit</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.containers/26261</link>
    <description>&lt;pre&gt;Prevent un-init user namespace from generating lots of skb.

Signed-off-by: Gao feng &amp;lt;gaofeng-BthXqXjhjHXQFUHtdCDX3A&amp;lt; at &amp;gt;public.gmane.org&amp;gt;
---
 kernel/audit.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/kernel/audit.c b/kernel/audit.c
index 79a8b8e..297ac6e 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -303,6 +303,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int audit_set_rate_limit(int limit)
 
 static int audit_set_backlog_limit(int limit)
 {
+if (current_user_ns() != &amp;amp;init_user_ns)
+return -EPERM;
+
 return audit_do_config_change("audit_backlog_limit", &amp;amp;audit_backlog_limit, limit);
 }
 
&lt;/pre&gt;</description>
    <dc:creator>Gao feng</dc:creator>
    <dc:date>2013-06-19T01:53:47</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.containers/26260">
    <title>[PATCH 14/22] Audit: only allow init user namespace to changeaudit_failure</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.containers/26260</link>
    <description>&lt;pre&gt;Setting audit_failure to AUDIT_FAIL_PANIC may
cause system panic.

We should disallow uninit user namesapce to change it.

Signed-off-by: Gao feng &amp;lt;gaofeng-BthXqXjhjHXQFUHtdCDX3A&amp;lt; at &amp;gt;public.gmane.org&amp;gt;
---
 kernel/audit.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/kernel/audit.c b/kernel/audit.c
index 306231d..79a8b8e 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -327,6 +327,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int audit_set_failure(int state)
     &amp;amp;&amp;amp; state != AUDIT_FAIL_PANIC)
 return -EINVAL;
 
+if (current_user_ns() != &amp;amp;init_user_ns)
+return -EPERM;
+
 return audit_do_config_change("audit_failure", &amp;amp;audit_failure, state);
 }
 
&lt;/pre&gt;</description>
    <dc:creator>Gao feng</dc:creator>
    <dc:date>2013-06-19T01:53:46</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.containers/26259">
    <title>[PATCH 04/22] netlink: Add compare function for netlink_table</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.containers/26259</link>
    <description>&lt;pre&gt;As we know, netlink sockets are private resource of
net namespace, they can communicate with each other
only when they in the same net namespace. this works
well until we try to add namespace support for other
subsystems which use netlink.

Don't like ipv4 and route table.., it is not suited to
make these subsytems belong to net namespace, Such as
audit and crypto subsystems,they are more suitable to
user namespace.

So we must have the ability to make the netlink sockets
in same user namespace can communicate with each other.

This patch adds a new function pointer "compare" for
netlink_table, we can decide if the netlink sockets can
communicate with each other through this netlink_table
self-defined compare function.

The behavior isn't changed if we don't provide the compare
function for netlink_table.

Signed-off-by: Gao feng &amp;lt;gaofeng-BthXqXjhjHXQFUHtdCDX3A&amp;lt; at &amp;gt;public.gmane.org&amp;gt;
---
 include/linux/netlink.h  |  1 +
 net/netlink/af_netlink.c | 32 ++++++++++++++++++++++++--------
 net/netlink/af_netlink.h |  1&lt;/pre&gt;</description>
    <dc:creator>Gao feng</dc:creator>
    <dc:date>2013-06-19T01:53:36</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.containers/26258">
    <title>[Part1 PATCH 00/22] Add namespace support for audit</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.containers/26258</link>
    <description>&lt;pre&gt;This patchset is first part of namespace support for audit.
in this patchset, the mainly resources of audit system have
been isolated. the audit filter, rules havn't been isolated
now. It will be implemented in Part2. We finished the isolation
of user audit message in this patchset.

I choose to assign audit to the user namespace.
Right now,there are six kinds of namespaces, such as
net, mount, ipc, pid, uts and user. the first five
namespaces have special usage. the audit isn't suitable to
belong to these five namespaces, And since the flag of system
call clone is in short supply, we can't provide a new flag such
as CLONE_NEWAUDIT to enable audit namespace separately. so the
user namespace may be the best choice.

[Patch 4/21] add a compare function pointer for netlink table,
so audit subsystem can use it's self-defined compare function
to make sure audit netlink sockets can communicate with each
other when they in the same user namespace. this patch has been
merged into David's net-next tree.

There is one&lt;/pre&gt;</description>
    <dc:creator>Gao feng</dc:creator>
    <dc:date>2013-06-19T01:53:32</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.containers/26257">
    <title>[PATCH 03/22] Audit: make audit kernel side netlink sock per userns</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.containers/26257</link>
    <description>&lt;pre&gt;This patch try to make the audit_sock per user namespace,
not global.

Since sock is assigned to net namespace, when creating
a netns, we will allocate a audit_sock for the userns
which create this netns, and this netns will keep alive
until the creator userns being destroyed.

If userns creates many netns, the audit_sock is only
allocated once.

Signed-off-by: Gao feng &amp;lt;gaofeng-BthXqXjhjHXQFUHtdCDX3A&amp;lt; at &amp;gt;public.gmane.org&amp;gt;
---
 include/linux/audit.h          |   5 +++
 include/linux/user_namespace.h |   9 ++++
 kernel/audit.c                 | 100 +++++++++++++++++++++++++++++++----------
 kernel/user_namespace.c        |   2 +
 4 files changed, 93 insertions(+), 23 deletions(-)

diff --git a/include/linux/audit.h b/include/linux/audit.h
index b20b038..85f9d7f 100644
--- a/include/linux/audit.h
+++ b/include/linux/audit.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -439,6 +439,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; extern int audit_log_task_context(struct audit_buffer *ab);
 extern void audit_log_task_info(struct audit_buffer *ab,
 struct task_struct *tsk);
 
+extern void    audi&lt;/pre&gt;</description>
    <dc:creator>Gao feng</dc:creator>
    <dc:date>2013-06-19T01:53:35</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.containers/26256">
    <title>[PATCH 01/22] Audit: change type of audit_ever_enabled to bool</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.containers/26256</link>
    <description>&lt;pre&gt;It's better to define audit_ever_enabled as bool.

Signed-off-by: Gao feng &amp;lt;gaofeng-BthXqXjhjHXQFUHtdCDX3A&amp;lt; at &amp;gt;public.gmane.org&amp;gt;
---
 kernel/audit.c | 2 +-
 kernel/audit.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/audit.c b/kernel/audit.c
index 91e53d0..ad3084c 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -78,7 +78,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static intaudit_initialized;
 #define AUDIT_ON1
 #define AUDIT_LOCKED2
 intaudit_enabled;
-intaudit_ever_enabled;
+boolaudit_ever_enabled;
 
 EXPORT_SYMBOL_GPL(audit_enabled);
 
diff --git a/kernel/audit.h b/kernel/audit.h
index 1c95131..2258827 100644
--- a/kernel/audit.h
+++ b/kernel/audit.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -205,7 +205,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct audit_context {
 #endif
 };
 
-extern int audit_ever_enabled;
+extern bool audit_ever_enabled;
 
 extern void audit_copy_inode(struct audit_names *name,
      const struct dentry *dentry,
&lt;/pre&gt;</description>
    <dc:creator>Gao feng</dc:creator>
    <dc:date>2013-06-19T01:53:33</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.containers/26255">
    <title>[PATCH 11/22] Audit: make audit_ever_enabled per user namespace</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.containers/26255</link>
    <description>&lt;pre&gt;We set audit_ever_enabled true after we enabled audit once.
and if audit_ever_enabled is true, we will allocate audit
context for task.

We should decide if to allocate audit context for tasks based on
if the audit is enabled once in the user namespace which the
task belongs to.

Signed-off-by: Gao feng &amp;lt;gaofeng-BthXqXjhjHXQFUHtdCDX3A&amp;lt; at &amp;gt;public.gmane.org&amp;gt;
---
 include/linux/user_namespace.h | 1 +
 kernel/audit.c                 | 7 +++----
 kernel/auditsc.c               | 5 ++++-
 3 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h
index 9972f0f..a2c0a79 100644
--- a/include/linux/user_namespace.h
+++ b/include/linux/user_namespace.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -27,6 +27,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct audit_ctrl {
 struct sk_buff_headqueue;
 struct sk_buff_headhold_queue;
 struct task_struct*kauditd_task;
+boolever_enabled;
 };
 #endif
 
diff --git a/kernel/audit.c b/kernel/audit.c
index 758b1e8..923fe27 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -78,7 +78,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;&lt;/pre&gt;</description>
    <dc:creator>Gao feng</dc:creator>
    <dc:date>2013-06-19T01:53:43</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.containers/26254">
    <title>[PATCH 08/22] Audit: make kauditd_task per user namespace</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.containers/26254</link>
    <description>&lt;pre&gt;This patch makes kauditd_task per user namespace,
Since right now we only allow user in init user
namesapce to send audit netlink message to kernel,
so actually the kauditd_task belongs to other user
namespace will still not run.

Signed-off-by: Gao feng &amp;lt;gaofeng-BthXqXjhjHXQFUHtdCDX3A&amp;lt; at &amp;gt;public.gmane.org&amp;gt;
---
 include/linux/audit.h          |  1 +
 include/linux/user_namespace.h | 15 +++++++++--
 kernel/audit.c                 | 58 ++++++++++++++++++++++++++----------------
 kernel/audit.h                 |  5 ++--
 kernel/auditsc.c               |  6 ++---
 5 files changed, 55 insertions(+), 30 deletions(-)

diff --git a/include/linux/audit.h b/include/linux/audit.h
index 6720901..179351d 100644
--- a/include/linux/audit.h
+++ b/include/linux/audit.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -26,6 +26,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include &amp;lt;linux/sched.h&amp;gt;
 #include &amp;lt;linux/ptrace.h&amp;gt;
 #include &amp;lt;uapi/linux/audit.h&amp;gt;
+#include &amp;lt;linux/user_namespace.h&amp;gt;
 
 struct audit_sig_info {
 uid_tuid;
diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h
index 53&lt;/pre&gt;</description>
    <dc:creator>Gao feng</dc:creator>
    <dc:date>2013-06-19T01:53:40</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.containers/26253">
    <title>[PATCH 02/22] Audit: remove duplicate comments</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.containers/26253</link>
    <description>&lt;pre&gt;Remove it.

Signed-off-by: Gao feng &amp;lt;gaofeng-BthXqXjhjHXQFUHtdCDX3A&amp;lt; at &amp;gt;public.gmane.org&amp;gt;
---
 kernel/audit.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/kernel/audit.c b/kernel/audit.c
index ad3084c..843e7a2 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1067,13 +1067,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void wait_for_auditd(unsigned long sleep_time)
 remove_wait_queue(&amp;amp;audit_backlog_wait, &amp;amp;wait);
 }
 
-/* Obtain an audit buffer.  This routine does locking to obtain the
- * audit buffer, but then no locking is required for calls to
- * audit_log_*format.  If the tsk is a task that is currently in a
- * syscall, then the syscall is marked as auditable and an audit record
- * will be written at syscall exit.  If there is no associated task, tsk
- * should be NULL. */
-
 /**
  * audit_log_start - obtain an audit buffer
  * &amp;lt; at &amp;gt;ctx: audit_context (may be NULL)
&lt;/pre&gt;</description>
    <dc:creator>Gao feng</dc:creator>
    <dc:date>2013-06-19T01:53:34</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.containers/26252">
    <title>[PATCH 07/22] Audit: make audit_skb_hold_queue per user namespace</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.containers/26252</link>
    <description>&lt;pre&gt;After this patch, ervery user namespace has one
audit_skb_hold_queue. Since we havn't finish the
preparations, only allow user to operate the skb
hold queue of init user namespace.

Signed-off-by: Gao feng &amp;lt;gaofeng-BthXqXjhjHXQFUHtdCDX3A&amp;lt; at &amp;gt;public.gmane.org&amp;gt;
---
 include/linux/user_namespace.h |  1 +
 kernel/audit.c                 | 16 +++++++++-------
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h
index e322f20..53420a4 100644
--- a/include/linux/user_namespace.h
+++ b/include/linux/user_namespace.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -22,6 +22,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct uid_gid_map {/* 64 bytes -- 1 cache line */
 struct audit_ctrl {
 struct sock*sock;
 struct sk_buff_headqueue;
+struct sk_buff_headhold_queue;
 };
 #endif
 
diff --git a/kernel/audit.c b/kernel/audit.c
index e2f6366..75325f0 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -131,8 +131,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static DEFINE_SPINLOCK(audit_freelist_lock);
 static int   audit_freelist_count;
 static LIST_HEAD(audit_free&lt;/pre&gt;</description>
    <dc:creator>Gao feng</dc:creator>
    <dc:date>2013-06-19T01:53:39</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.kernel.containers/26251">
    <title>[PATCH 06/22] Audit: make audit_skb_queue per user namespace</title>
    <link>http://permalink.gmane.org/gmane.linux.kernel.containers/26251</link>
    <description>&lt;pre&gt;After this patch, ervery user namespace has one
audit_skb_queue. Since we havn't finish the preparations,
only allow user to operate the skb queue of init user
namespace.

Signed-off-by: Gao feng &amp;lt;gaofeng-BthXqXjhjHXQFUHtdCDX3A&amp;lt; at &amp;gt;public.gmane.org&amp;gt;
---
 include/linux/audit.h          |  4 ++++
 include/linux/user_namespace.h |  2 ++
 kernel/audit.c                 | 34 +++++++++++++++++++++++++---------
 kernel/user_namespace.c        |  1 +
 4 files changed, 32 insertions(+), 9 deletions(-)

diff --git a/include/linux/audit.h b/include/linux/audit.h
index 85f9d7f..6720901 100644
--- a/include/linux/audit.h
+++ b/include/linux/audit.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -439,6 +439,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; extern int audit_log_task_context(struct audit_buffer *ab);
 extern void audit_log_task_info(struct audit_buffer *ab,
 struct task_struct *tsk);
 
+extern void    audit_set_user_ns(struct user_namespace *ns);
 extern void    audit_free_user_ns(struct user_namespace *ns);
 
 extern int    audit_update_lsm_rules(void);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -495,6 +496,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static inline &lt;/pre&gt;</description>
    <dc:creator>Gao feng</dc:creator>
    <dc:date>2013-06-19T01:53:38</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.linux.kernel.containers">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.linux.kernel.containers</link>
  </textinput>
</rdf:RDF>
