From: Christian Brauner <brauner@kernel.org>
To: Stefan Roesch <shr@fb.com>, Christoph Hellwig <hch@lst.de>,
Jan Kara <jack@suse.cz>
Cc: Stefan Roesch <shr@fb.com>, Jens Axboe <axboe@kernel.dk>,
"Darrick J. Wong" <djwong@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
linux-fsdevel@vger.kernel.org, lkp@lists.01.org, lkp@intel.com,
ying.huang@intel.com, feng.tang@intel.com,
zhengjun.xing@linux.intel.com, fengwei.yin@intel.com,
kernel test robot <oliver.sang@intel.com>
Subject: Re: [fs] faf99b5635: will-it-scale.per_thread_ops -9.0% regression
Date: Mon, 15 Aug 2022 12:00:44 +0200 [thread overview]
Message-ID: <20220815100044.7j2u2yjlkanhkrfg@wittgenstein> (raw)
In-Reply-To: <YvnMWbRDhM0fH4E/@xsang-OptiPlex-9020>
On Mon, Aug 15, 2022 at 12:32:25PM +0800, kernel test robot wrote:
>
>
> Greeting,
>
> FYI, we noticed a -9.0% regression of will-it-scale.per_thread_ops due to commit:
>
>
> commit: faf99b563558f74188b7ca34faae1c1da49a7261 ("fs: add __remove_file_privs() with flags parameter")
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git master
This seems overall pretty odd tbh at least it's not immediately obvious
how that specific commit would've caused this. But fwiw, I think there's
one issue in this change which we originally overlooked which might
explain this.
Before faf99b563558 ("fs: add __remove_file_privs() with flags
parameter") inode_has_no_xattr() was called when
dentry_needs_remove_privs() returned 0.
int error = 0
[...]
kill = dentry_needs_remove_privs(dentry);
if (kill < 0)
return kill;
if (kill)
error = __remove_privs(file_mnt_user_ns(file), dentry, kill);
if (!error)
inode_has_no_xattr(inode);
but now we do:
kill = dentry_needs_remove_privs(dentry);
if (kill <= 0)
return kill;
which means we don't call inode_has_no_xattr(). I don't think that we
did this intentionally. inode_has_no_xattr() just sets S_NOSEC which
means next time we call into __file_remove_privs() we can return earlier
instead of hitting dentry_needs_remove_privs() again:
if (IS_NOSEC(inode) || !S_ISREG(inode->i_mode))
return 0;
So I think that needs to be fixed?
Christian
next prev parent reply other threads:[~2022-08-15 10:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-15 4:32 [fs] faf99b5635: will-it-scale.per_thread_ops -9.0% regression kernel test robot
2022-08-15 10:00 ` Christian Brauner [this message]
2022-08-16 9:35 ` Stefan Roesch
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=20220815100044.7j2u2yjlkanhkrfg@wittgenstein \
--to=brauner@kernel.org \
--cc=axboe@kernel.dk \
--cc=djwong@kernel.org \
--cc=feng.tang@intel.com \
--cc=fengwei.yin@intel.com \
--cc=hch@lst.de \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=lkp@lists.01.org \
--cc=oliver.sang@intel.com \
--cc=shr@fb.com \
--cc=ying.huang@intel.com \
--cc=zhengjun.xing@linux.intel.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;
as well as URLs for NNTP newsgroup(s).