All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: linux-fsdevel@vger.kernel.org, linux-security-module@vger.kernel.org
Subject: Re: gfp flags for security_inode_alloc()?
Date: Thu, 29 Mar 2012 16:42:14 +1100	[thread overview]
Message-ID: <20120329054214.GN5091@dastard> (raw)
In-Reply-To: <201203280422.q2S4MHAc031930@www262.sakura.ne.jp>

On Wed, Mar 28, 2012 at 01:22:17PM +0900, Tetsuo Handa wrote:
> security_inode_alloc() is called from inode_init_always().
> inode_init_always() is called from xfs_inode_alloc().
....
> Therefore, should SMACK use GFP_NOFS like SELinux does?

Yes, because you have no idea what the calling context is except
for the fact that is from somewhere inside filesystem code and the
filesystem could be holding locks. Therefore, GFP_NOFS is really the
only really safe way to allocate memory here.

Cheers,

Dave.

-- 
Dave Chinner
david@fromorbit.com

  parent reply	other threads:[~2012-03-29  5:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-28  4:22 gfp flags for security_inode_alloc()? Tetsuo Handa
2012-03-28 15:50 ` Casey Schaufler
2012-03-29  5:42 ` Dave Chinner [this message]
2012-03-29  7:19   ` Tetsuo Handa
2012-03-29 13:36     ` Casey Schaufler
2012-04-09 16:22     ` Casey Schaufler

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=20120329054214.GN5091@dastard \
    --to=david@fromorbit.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=penguin-kernel@I-love.SAKURA.ne.jp \
    /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.