Re: [RFC PATCH 2/5] ima: Add ns_status for storing namespaced iint data

2017-08-11 Thread Stefan Berger
On 07/20/2017 06:50 PM, Mehmet Kayaalp wrote: This patch adds an rbtree to the IMA namespace structure that stores a namespaced version of iint->flags in ns_status struct. Similar to the integrity_iint_cache, both the iint ns_struct are looked up using the inode pointer value. The lookup,

Re: [RFC PATCH 2/5] ima: Add ns_status for storing namespaced iint data

2017-08-11 Thread Stefan Berger
On 07/20/2017 06:50 PM, Mehmet Kayaalp wrote: This patch adds an rbtree to the IMA namespace structure that stores a namespaced version of iint->flags in ns_status struct. Similar to the integrity_iint_cache, both the iint ns_struct are looked up using the inode pointer value. The lookup,

Re: [RFC PATCH 2/5] ima: Add ns_status for storing namespaced iint data

2017-07-25 Thread Serge E. Hallyn
On Tue, Jul 25, 2017 at 04:15:25PM -0400, Mimi Zohar wrote: > On Tue, 2017-07-25 at 14:43 -0500, Serge E. Hallyn wrote: > > ... > > > +static void free_ns_status_cache(struct ima_namespace *ns) > > > +{ > > > + struct ns_status *status, *next; > > > + > > > + write_lock(>ns_status_lock); > > > +

Re: [RFC PATCH 2/5] ima: Add ns_status for storing namespaced iint data

2017-07-25 Thread Serge E. Hallyn
On Tue, Jul 25, 2017 at 04:15:25PM -0400, Mimi Zohar wrote: > On Tue, 2017-07-25 at 14:43 -0500, Serge E. Hallyn wrote: > > ... > > > +static void free_ns_status_cache(struct ima_namespace *ns) > > > +{ > > > + struct ns_status *status, *next; > > > + > > > + write_lock(>ns_status_lock); > > > +

Re: [RFC PATCH 2/5] ima: Add ns_status for storing namespaced iint data

2017-07-25 Thread Stefan Berger
On 07/25/2017 04:15 PM, Mimi Zohar wrote: On Tue, 2017-07-25 at 14:43 -0500, Serge E. Hallyn wrote: ... +static void free_ns_status_cache(struct ima_namespace *ns) +{ + struct ns_status *status, *next; + + write_lock(>ns_status_lock); +

Re: [RFC PATCH 2/5] ima: Add ns_status for storing namespaced iint data

2017-07-25 Thread Stefan Berger
On 07/25/2017 04:15 PM, Mimi Zohar wrote: On Tue, 2017-07-25 at 14:43 -0500, Serge E. Hallyn wrote: ... +static void free_ns_status_cache(struct ima_namespace *ns) +{ + struct ns_status *status, *next; + + write_lock(>ns_status_lock); +

Re: [RFC PATCH 2/5] ima: Add ns_status for storing namespaced iint data

2017-07-25 Thread Mimi Zohar
On Tue, 2017-07-25 at 14:43 -0500, Serge E. Hallyn wrote: > ... > > +static void free_ns_status_cache(struct ima_namespace *ns) > > +{ > > + struct ns_status *status, *next; > > + > > + write_lock(>ns_status_lock); > > + rbtree_postorder_for_each_entry_safe(status, next, > > +

Re: [RFC PATCH 2/5] ima: Add ns_status for storing namespaced iint data

2017-07-25 Thread Mimi Zohar
On Tue, 2017-07-25 at 14:43 -0500, Serge E. Hallyn wrote: > ... > > +static void free_ns_status_cache(struct ima_namespace *ns) > > +{ > > + struct ns_status *status, *next; > > + > > + write_lock(>ns_status_lock); > > + rbtree_postorder_for_each_entry_safe(status, next, > > +

Re: [RFC PATCH 2/5] ima: Add ns_status for storing namespaced iint data

2017-07-25 Thread Serge E. Hallyn
... > +static void free_ns_status_cache(struct ima_namespace *ns) > +{ > + struct ns_status *status, *next; > + > + write_lock(>ns_status_lock); > + rbtree_postorder_for_each_entry_safe(status, next, > + >ns_status_tree, rb_node) > +

Re: [RFC PATCH 2/5] ima: Add ns_status for storing namespaced iint data

2017-07-25 Thread Serge E. Hallyn
... > +static void free_ns_status_cache(struct ima_namespace *ns) > +{ > + struct ns_status *status, *next; > + > + write_lock(>ns_status_lock); > + rbtree_postorder_for_each_entry_safe(status, next, > + >ns_status_tree, rb_node) > +