From: Cyrill Gorcunov <gorcunov@openvz.org>
To: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-api@vger.kernel.org
Cc: viro@zeniv.linux.org.uk, akpm@linuxfoundation.org,
avagin@virtuozzo.com, xemul@virtuozzo.com,
mtk.manpages@gmail.com, kir@openvz.org, gorcunov@openvz.org,
luto@amacapital.net, jbaron@akamai.com
Subject: [RFC 0/3] fs,epoll: Add ability to call kcmp to find target files
Date: Tue, 21 Feb 2017 19:59:44 +0300 [thread overview]
Message-ID: <20170221165944.180372636@openvz.org> (raw)
Hi! In previous series EPOLL_CTL_DUP operation has been discussed
but considered as potentially scary. So here is an another approach:
- extend fdinfo of epoll files with inode, device and file position
for every target, which allow the reader to gather targets with
this bundle as a key for primary sorting
- extent kcmp to check if some particular file is matching one
sitting inside epoll queue (duplicate numbers are resolved with
offset parameter)
Please take a look once time permit. Note that I did only basic
testing (without CRIU) but it should fit our needs because we
sort and lookup regualr files by same scheme. So I'm about to
implemet full criu support for this new kernel features in
a couple of days thus any comments are *higly* appreciated.
NB: Initially I added
if (file_ns_capable(epi->ffd.file, ns, CAP_SYS_ADMIN))
into fdinfo output to check if caller is allowed to see
target ino/dev/pos but dropped it later because if process
is added file descriptor into epoll queue it mean fdstat
and such already can be called and this information is
already obtained, so I don't this it's information
disclosure.
Cyrill
next reply other threads:[~2017-02-21 16:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-21 16:59 Cyrill Gorcunov [this message]
2017-02-21 20:32 ` [RFC 0/3] fs,epoll: Add ability to call kcmp to find target files Jason Baron
2017-02-21 20:54 ` Cyrill Gorcunov
2017-02-28 17:11 ` Cyrill Gorcunov
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=20170221165944.180372636@openvz.org \
--to=gorcunov@openvz.org \
--cc=akpm@linuxfoundation.org \
--cc=avagin@virtuozzo.com \
--cc=jbaron@akamai.com \
--cc=kir@openvz.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=mtk.manpages@gmail.com \
--cc=viro@zeniv.linux.org.uk \
--cc=xemul@virtuozzo.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).