public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mimi Zohar <zohar@linux.vnet.ibm.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: linux-security-module@vger.kernel.org,
	linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
	James Morris <jmorris@namei.org>,
	David Safford <safford@watson.ibm.com>,
	Mimi Zohar <zohar@us.ibm.com>
Subject: Re: [PATCH 1/2] evm: building without EVM enabled fixes
Date: Fri, 12 Aug 2011 00:08:28 -0400	[thread overview]
Message-ID: <1313122108.3228.22.camel@localhost.localdomain> (raw)
In-Reply-To: <20110812125234.bb689ec3cd29f2ac48f3453d@canb.auug.org.au>

On Fri, 2011-08-12 at 12:52 +1000, Stephen Rothwell wrote:
> Hi Mimi,
> 
> On Thu, 11 Aug 2011 00:22:51 -0400 Mimi Zohar <zohar@linux.vnet.ibm.com> wrote:
> >
> > - Missing 'inline' on evm_inode_setattr() definition.
> > Introduced by commit 817b54aa45db ("evm: add evm_inode_setattr to prevent
> > updating an invalid security.evm").
> > 
> > - Missing security_old_inode_init_security() stub function definition.
> > Caused by commit 9d8f13ba3f48 ("security: new security_inode_init_security
> > API adds function callback").
> > 
> > Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
> > ---
> >  include/linux/evm.h      |    2 +-
> >  include/linux/security.h |    7 +++++++
> >  2 files changed, 8 insertions(+), 1 deletions(-)
> > 
> > diff --git a/include/linux/evm.h b/include/linux/evm.h
> > index db5556d..62deb65 100644
> > --- a/include/linux/evm.h
> > +++ b/include/linux/evm.h
> > @@ -45,7 +45,7 @@ static inline enum integrity_status evm_verifyxattr(struct dentry *dentry,
> >  }
> >  #endif
> >  
> > -static int evm_inode_setattr(struct dentry *dentry, struct iattr *attr)
> > +static inline int evm_inode_setattr(struct dentry *dentry, struct iattr *attr)
> >  {
> >  	return 0;
> >  }
> > diff --git a/include/linux/security.h b/include/linux/security.h
> > index 1c528b1..f399cf1 100644
> > --- a/include/linux/security.h
> > +++ b/include/linux/security.h
> > @@ -2048,6 +2048,13 @@ static inline int security_inode_init_security(struct inode *inode,
> >  	return -EOPNOTSUPP;
> >  }
> >  
> > +int security_old_inode_init_security(struct inode *inode, struct inode *dir,
> > +				     const struct qstr *qstr, char **name,
> > +				     void **value, size_t *len)
> > +{
> > +	return -EOPNOTSUPP;
> > +}
> > +
> 
> These stub functions *must* be "staic inline" (see my build report on
> linux-next) just like the one you fixed above.
> 
> Good plan:  if you introduce a function whose existance (or behaviour)
> depends on a CONFIG option, then build test with and without that CONFIG
> option set.

I really did rebuild and test without EVM enabled.  sigh, it would have
helped to also configure the filesystems which use the stub function.

Mimi




      reply	other threads:[~2011-08-12  4:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-11  4:22 [PATCH 1/2] evm: building without EVM enabled fixes Mimi Zohar
2011-08-11  4:22 ` [PATCH 2/2] evm: fix evm_inode_init_security return code Mimi Zohar
2011-08-11  8:13   ` James Morris
2011-08-12  2:52 ` [PATCH 1/2] evm: building without EVM enabled fixes Stephen Rothwell
2011-08-12  4:08   ` Mimi Zohar [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=1313122108.3228.22.camel@localhost.localdomain \
    --to=zohar@linux.vnet.ibm.com \
    --cc=jmorris@namei.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=safford@watson.ibm.com \
    --cc=sfr@canb.auug.org.au \
    --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