All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyrill Gorcunov <gorcunov@gmail.com>
To: Vasiliy Kulikov <segoon@openwall.com>
Cc: Pavel Machek <pavel@ucw.cz>, Andrew Morton <akpm00@gmail.com>,
	linux-kernel@vger.kernel.org, containers@lists.osdl.org,
	linux-fsdevel@vger.kernel.org,
	Kirill Shutemov <kirill@shutemov.name>,
	Pavel Emelyanov <xemul@parallels.com>,
	James Bottomley <jbottomley@parallels.com>,
	Nathan Lynch <ntl@pobox.com>, Zan Lynx <zlynx@acm.org>,
	Daniel Lezcano <dlezcano@fr.ibm.com>, Tejun Heo <tj@kernel.org>,
	Alexey Dobriyan <adobriyan@gmail.com>,
	Al Viro <viro@ZenIV.linux.org.uk>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [patch 2/2] fs, proc: Introduce the /proc/<pid>/map_files/ directory v12
Date: Thu, 15 Sep 2011 14:29:22 +0400	[thread overview]
Message-ID: <20110915102922.GB27755@sun> (raw)
In-Reply-To: <20110915092757.GA23404@albatros>

On Thu, Sep 15, 2011 at 01:27:57PM +0400, Vasiliy Kulikov wrote:
...
> 
> > in case two of them has a mapping shared, we map
> >    the memory by the 1st one and then open its /proc/$pid/map_files/address file and
> >    map it by the 2nd task.
> 
> How can you restore a set of processes in case they share an RW mapping
> as RW in both tasks if you deny opening /proc/$pid/map_files/$address as W?

I can read the link first to figure out the file path and re-open it as rw via
path itself (which implies the restorer still must have enough rights to open
it as rw).

> 
> > Using /proc/$pid/maps for this is quite inconvenient since it brings repeatable
> > re-reading and reparsing for this text file which slows down restore procesure
> > significantly. Also as being pointed in (3) it is a way easier to use top level
> > shared mapping in children as /proc/$pid/map_files/address when needed.
> [...]
> > v14: (by Vasiliy Kulikov)
> >  - for security reason the links are created with FMODE_READ mode
> >    only even if the former file has FMODE_WRITE
> >  - proc_map_files_lookup fails on any non-read-only queries.
> 
> Do you have a PoC of the dumper?  At least without the restorer.  If we
> see an implementation of map_files/ user we probably identify what
> operation it needs and what security restrictions we have to define.

Yeah, i'll ping you the link (while beign trying various approaches
the code end up in being a pure mess, so until all cleaned up and
works as expected i'll not public it).

	Cyrill

  reply	other threads:[~2011-09-15 10:29 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-13 21:13 [patch 0/2] symlinks for mapped files in proc Cyrill Gorcunov
2011-09-13 21:14 ` [patch 1/2] fs, proc: Make proc_get_link to use dentry instead of inode Cyrill Gorcunov
2011-09-14  1:37   ` Kirill A. Shutemov
2011-09-13 21:14 ` [patch 2/2] fs, proc: Introduce the /proc/<pid>/map_files/ directory v12 Cyrill Gorcunov
     [not found]   ` <20110914023428.GA4034@shutemov.name>
2011-09-14  5:54     ` Cyrill Gorcunov
2011-09-14  6:52   ` Andrew Morton
2011-09-14 10:56     ` Cyrill Gorcunov
2011-09-14 11:14       ` Pavel Machek
2011-09-14 11:39         ` Cyrill Gorcunov
2011-09-14 13:44           ` Cyrill Gorcunov
2011-09-14 14:48             ` Vasiliy Kulikov
2011-09-14 14:57               ` Vasiliy Kulikov
2011-09-14 16:00               ` Cyrill Gorcunov
2011-09-14 16:07                 ` Vasiliy Kulikov
2011-09-14 16:13                   ` Pavel Emelyanov
2011-09-14 16:21                     ` Vasiliy Kulikov
2011-09-15  9:14                   ` Cyrill Gorcunov
2011-09-15  9:27                     ` Vasiliy Kulikov
2011-09-15 10:29                       ` Cyrill Gorcunov [this message]
2011-09-15 10:56                         ` Vasiliy Kulikov
2011-09-15 11:00                           ` Cyrill Gorcunov
2011-09-15 20:19                           ` Cyrill Gorcunov
2011-09-16 17:56                             ` Vasiliy Kulikov
2011-09-16 18:07                               ` Cyrill Gorcunov
2011-09-16 18:11                                 ` Vasiliy Kulikov
2011-09-16 18:26                                   ` Cyrill Gorcunov
2011-09-16 18:31                                     ` Kirill A. Shutemov
2011-09-16 18:40                                       ` 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=20110915102922.GB27755@sun \
    --to=gorcunov@gmail.com \
    --cc=adobriyan@gmail.com \
    --cc=akpm00@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=containers@lists.osdl.org \
    --cc=dlezcano@fr.ibm.com \
    --cc=jbottomley@parallels.com \
    --cc=kirill@shutemov.name \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ntl@pobox.com \
    --cc=pavel@ucw.cz \
    --cc=segoon@openwall.com \
    --cc=tj@kernel.org \
    --cc=viro@ZenIV.linux.org.uk \
    --cc=xemul@parallels.com \
    --cc=zlynx@acm.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 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.