mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Serge E. Hallyn" <serue@us.ibm.com>
To: Chris Wright <chrisw@sous-sol.org>
Cc: Mimi Zohar <zohar@linux.vnet.ibm.com>,
	linux-kernel@vger.kernel.org, safford@watson.ibm.com,
	serue@linux.vnet.ibm.com, kjhall@linux.vnet.ibm.com,
	zohar@us.ibm.com
Subject: Re: [RFC][Patch 2/6] integrity: fs hook placement
Date: Thu, 8 Mar 2007 11:07:33 -0600	[thread overview]
Message-ID: <20070308170733.GA21099@sergelap.austin.ibm.com> (raw)
In-Reply-To: <20070308164132.GL6602@sequoia.sous-sol.org>

Quoting Chris Wright (chrisw@sous-sol.org):
> * Mimi Zohar (zohar@linux.vnet.ibm.com) wrote:
> > +	integrity_d_instantiate(entry, inode);
> >  	security_d_instantiate(entry, inode);
> 
> > +		integrity_d_instantiate(entry, inode);
> >  		security_d_instantiate(entry, inode);
> 
> >  			spin_unlock(&dcache_lock);
> > +			integrity_d_instantiate(new, inode);
> >  			security_d_instantiate(new, inode);
> >  			d_rehash(dentry);
> 
> >  			d_move(new, dentry);
> > +			integrity_d_instantiate(dentry, inode);
> >  			security_d_instantiate(dentry, inode);
> >  			d_rehash(dentry);
> 
> >  	if (actual == dentry) {
> > +		integrity_d_instantiate(dentry, inode);
> >  		security_d_instantiate(dentry, inode);
> 
> 
> >  		file->f_op->release(inode, file);
> >  	security_file_free(file);
> > +	integrity_file_free(file);
> 
> 
> >  		security_file_free(file);
> > +		integrity_file_free(file);
> 
> 
> > 		if (security_inode_alloc(inode)) {
> ...
> > +		if (integrity_inode_alloc(inode)) {
> > +			if (inode->i_sb->s_op->destroy_inode)
> > +				inode->i_sb->s_op->destroy_inode(inode);
> 
> >  	security_inode_free(inode);
> > +	integrity_inode_free(inode);
> 
> >  	error = security_inode_setxattr(dentry, name, value, size, flags);
> >  	if (error)
> >  		goto out;
> > +
> > +	error = integrity_inode_setxattr(dentry, name, value, size, flags);
> 
> >  			fsnotify_xattr(dentry);
> > +			integrity_inode_post_setxattr(dentry, name);
> >  			security_inode_post_setxattr(dentry, name, value,
> 
> I know there's some slightly different goals, but this just doesn't make
> sense.  Need to get back to defining and expressing just the differences.

Are you objecting only to the duplication at the callsites, so that an
fsnotify-type of consolidation of security and integrity hooks would be
ok?  Or are you complaining that the security_inode_setxattr and
integrity_inode_setxattr hooks are too similar anyway, and integrity
modules should just use some lsm hooks for anything which will be
authoritative?

(I could see an argument that integirty subsystem should be purely for
measuring and hence its hooks should never return a value.  Only hitch
there is that if integrity subsystem hits ENOMEM it should be able to
refuse the action...)

-serge

  reply	other threads:[~2007-03-08 17:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-08 16:03 Mimi Zohar
2007-03-08 16:41 ` Chris Wright
2007-03-08 17:07   ` Serge E. Hallyn [this message]
2007-03-08 17:40     ` Chris Wright
2007-03-08 18:01       ` Serge E. Hallyn
2007-03-08 19:22         ` Stephen Smalley
2007-03-08 21:07           ` Serge E. Hallyn
2007-03-08 18:34       ` Mimi Zohar
2007-03-08 18:16 ` Dmitriy Monakhov
2007-03-08 18:45   ` Mimi Zohar

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=20070308170733.GA21099@sergelap.austin.ibm.com \
    --to=serue@us.ibm.com \
    --cc=chrisw@sous-sol.org \
    --cc=kjhall@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=safford@watson.ibm.com \
    --cc=serue@linux.vnet.ibm.com \
    --cc=zohar@linux.vnet.ibm.com \
    --cc=zohar@us.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®