All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bob Peterson <rpeterso@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH v4 7/7] gfs2: Invalide security labels of inodes when they go invalid
Date: Thu, 29 Oct 2015 08:10:33 -0400 (EDT)	[thread overview]
Message-ID: <1229647109.67349682.1446120633603.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <1446079635-22462-8-git-send-email-agruenba@redhat.com>

----- Original Message -----
> When gfs2 releases the glock of an inode, it must invalidate all
> information cached for that inode, including the page cache and acls.  Use
> the new security_inode_invalidate_secctx hook to also invalidate security
> labels in that case.  These items will be reread from disk when needed
> after reacquiring the glock.
> 
> Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
> Cc: Steven Whitehouse <swhiteho@redhat.com>
> Cc: Bob Peterson <rpeterso@redhat.com>
> Cc: cluster-devel at redhat.com
> ---
>  fs/gfs2/glops.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c
> index 1f6c9c3..0833076 100644
> --- a/fs/gfs2/glops.c
> +++ b/fs/gfs2/glops.c
> @@ -13,6 +13,7 @@
>  #include <linux/gfs2_ondisk.h>
>  #include <linux/bio.h>
>  #include <linux/posix_acl.h>
> +#include <linux/security.h>
>  
>  #include "gfs2.h"
>  #include "incore.h"
> @@ -262,6 +263,7 @@ static void inode_go_inval(struct gfs2_glock *gl, int
> flags)
>  		if (ip) {
>  			set_bit(GIF_INVALID, &ip->i_flags);
>  			forget_all_cached_acls(&ip->i_inode);
> +			security_inode_invalidate_secctx(&ip->i_inode);
>  			gfs2_dir_hash_inval(ip);
>  		}
>  	}
> --
> 2.5.0
> 
> 
Hi,

Acked-by: Bob Peterson <rpeterso@redhat.com>

Bob Peterson
Red Hat File Systems



WARNING: multiple messages have this Message-ID (diff)
From: Bob Peterson <rpeterso@redhat.com>
To: Andreas Gruenbacher <agruenba@redhat.com>
Cc: linux-security-module@vger.kernel.org, selinux@tycho.nsa.gov,
	Steven Whitehouse <swhiteho@redhat.com>,
	cluster-devel@redhat.com
Subject: Re: [PATCH v4 7/7] gfs2: Invalide security labels of inodes when they go invalid
Date: Thu, 29 Oct 2015 08:10:33 -0400 (EDT)	[thread overview]
Message-ID: <1229647109.67349682.1446120633603.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <1446079635-22462-8-git-send-email-agruenba@redhat.com>

----- Original Message -----
> When gfs2 releases the glock of an inode, it must invalidate all
> information cached for that inode, including the page cache and acls.  Use
> the new security_inode_invalidate_secctx hook to also invalidate security
> labels in that case.  These items will be reread from disk when needed
> after reacquiring the glock.
> 
> Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
> Cc: Steven Whitehouse <swhiteho@redhat.com>
> Cc: Bob Peterson <rpeterso@redhat.com>
> Cc: cluster-devel@redhat.com
> ---
>  fs/gfs2/glops.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c
> index 1f6c9c3..0833076 100644
> --- a/fs/gfs2/glops.c
> +++ b/fs/gfs2/glops.c
> @@ -13,6 +13,7 @@
>  #include <linux/gfs2_ondisk.h>
>  #include <linux/bio.h>
>  #include <linux/posix_acl.h>
> +#include <linux/security.h>
>  
>  #include "gfs2.h"
>  #include "incore.h"
> @@ -262,6 +263,7 @@ static void inode_go_inval(struct gfs2_glock *gl, int
> flags)
>  		if (ip) {
>  			set_bit(GIF_INVALID, &ip->i_flags);
>  			forget_all_cached_acls(&ip->i_inode);
> +			security_inode_invalidate_secctx(&ip->i_inode);
>  			gfs2_dir_hash_inval(ip);
>  		}
>  	}
> --
> 2.5.0
> 
> 
Hi,

Acked-by: Bob Peterson <rpeterso@redhat.com>

Bob Peterson
Red Hat File Systems

  reply	other threads:[~2015-10-29 12:10 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-29  0:47 [PATCH v4 0/7] Inode security label invalidation Andreas Gruenbacher
2015-10-29  0:47 ` [PATCH v4 1/7] selinux: Remove unused variable in selinux_inode_init_security Andreas Gruenbacher
2015-10-29  0:47 ` [PATCH v4 2/7] security: Make inode argument of inode_getsecurity non-const Andreas Gruenbacher
2015-10-29 15:03   ` Stephen Smalley
2015-10-29  0:47 ` [PATCH v4 3/7] security: Make inode argument of inode_getsecid non-const Andreas Gruenbacher
2015-10-29 15:04   ` Stephen Smalley
2015-10-29  0:47 ` [PATCH v4 4/7] selinux: Add accessor functions for inode->i_security Andreas Gruenbacher
2015-10-29 15:08   ` Stephen Smalley
2015-10-29  0:47 ` [PATCH v4 5/7] security: Add hook to invalidate inode security labels Andreas Gruenbacher
2015-10-29 15:12   ` Stephen Smalley
2015-10-29  0:47 ` [PATCH v4 6/7] selinux: Revalidate invalid " Andreas Gruenbacher
2015-10-29 15:21   ` Stephen Smalley
2015-10-29 16:52     ` Andreas Gruenbacher
2015-11-01 12:52       ` Paul Moore
2015-11-01 17:25         ` Andreas Gruenbacher
2015-10-29 23:09   ` Andreas Gruenbacher
2015-10-29  0:47 ` [Cluster-devel] [PATCH v4 7/7] gfs2: Invalide security labels of inodes when they go invalid Andreas Gruenbacher
2015-10-29  0:47   ` Andreas Gruenbacher
2015-10-29 12:10   ` Bob Peterson [this message]
2015-10-29 12:10     ` Bob Peterson
2015-10-30 11:51   ` [Cluster-devel] " Steven Whitehouse
2015-10-30 11:51     ` Steven Whitehouse

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=1229647109.67349682.1446120633603.JavaMail.zimbra@redhat.com \
    --to=rpeterso@redhat.com \
    /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.