linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Charles Manning <manningc2@actrix.gen.nz>
To: linux-fsdevel@vger.kernel.org
Subject: Too many security check reads to getxattr?
Date: Tue, 31 Aug 2010 13:24:01 +1200	[thread overview]
Message-ID: <201008311324.01178.manningc2@actrix.gen.nz> (raw)


I'm investigating a performance degradation in yaffs when xattribs are 
enabled. Yes, I know yaffs is not part of mainline Linux yet, but this is 
really a vfs question.

What I notice is that on every write the "security.capability" xattribute gets 
checked. Surely once the vfs has tried reading this once it should not try 
again on every write.

Herewith a call stack

[ 2317.288740]  [<f85b3b17>] yaffs_getxattr+0x27/0xa0 [yaffs2]
[ 2317.288746]  [<f85b3af0>] ? yaffs_getxattr+0x0/0xa0 [yaffs2]
[ 2317.288750]  [<c03091c7>] cap_inode_need_killpriv+0x37/0x50
[ 2317.288753]  [<c030a434>] security_inode_need_killpriv+0x14/0x20
[ 2317.288757]  [<c01dda2d>] file_remove_suid+0x1d/0x60
[ 2317.288761]  [<c01dfd8a>] __generic_file_aio_write+0x25a/0x550
[ 2317.288764]  [<c0229eef>] ? link_path_walk+0x42f/0x9b0
[ 2317.288768]  [<c023075f>] ? dput+0x6f/0xd0
[ 2317.288772]  [<c01e00d8>] generic_file_aio_write+0x58/0xc0
[ 2317.288775]  [<c021e819>] do_sync_write+0xb9/0xf0
[ 2317.288779]  [<c0222954>] ? cp_new_stat64+0xe4/0x100
[ 2317.288783]  [<c0338346>] ? apparmor_file_permission+0x16/0x20
[ 2317.288786]  [<c030ba4d>] ? security_file_permission+0x1d/0x80
[ 2317.288790]  [<c021e9b1>] ? rw_verify_area+0x71/0xe0
[ 2317.288793]  [<c021eabb>] vfs_write+0x9b/0x160
[ 2317.288796]  [<c021e760>] ? do_sync_write+0x0/0xf0
[ 2317.288800]  [<c021f4a2>] sys_write+0x42/0x70
[ 2317.288803]  [<c0102cdf>] sysenter_do_call+0x12/0x28

[ 2317.288806] yaffs_getxattr "security.capability" from object 257

Any hints as to why this is happening and how to stop this from happening?

Thanks

-- Charles




             reply	other threads:[~2010-08-31  1:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-31  1:24 Charles Manning [this message]
2010-08-31  5:16 ` Too many security check reads to getxattr? Andreas Dilger

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=201008311324.01178.manningc2@actrix.gen.nz \
    --to=manningc2@actrix.gen.nz \
    --cc=linux-fsdevel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).