[CRIU] [PATCH] proc_parse: fix vma file open mode recognition

Andrew Vagin avagin at virtuozzo.com
Sun Jul 10 08:33:34 PDT 2016


On Thu, Jul 07, 2016 at 11:43:59AM +0200, Stanislav Kinsburskiy wrote:
> 
> 
> 07.07.2016 03:10, Andrew Vagin пишет:
> > On Thu, Jun 30, 2016 at 07:24:45PM +0300, Stanislav Kinsburskiy wrote:
> > > The correct place to get fd open flags for file mappings is
> > > /proc/<pid>/map_files.
> > > An attempt tp speculate on "shared" and "maywrite" bits doesn't garantee,
> > > that file will be opened with correct permissions on restore.
> > > Here is an example:
> > > 
> > > Process mapping (read/write):
> > > 
> > > # cat /proc/481943/maps | grep 7f7108077000-7f7108078000
> > > 7f7108077000-7f7108078000 rw-p 00001000 00:35 7 <snip>
> > > 
> > > 1) Before suspend:
> > > 
> > > # ls -l /proc/481427/map_files/7f7108077000-7f7108078000
> > > lrw------- <snip> /proc/481427/map_files/7f7108077000-7f7108078000 -> <snip>
> > > 
> > > 2) After restore:
> > > 
> > > # ls -l /proc/481943/map_files/7f7108077000-7f7108078000
> > > lr-------- <snip> /proc/481943/map_files/7f7108077000-7f7108078000 -> <snip>
> > > 
> > > Write bit is lost.
> > Could you add this check into zdtm.py?
> > 
> 
> I'm sorry, but I have no idea where and how to do this.
>

I'm sorry, but we accept patches only with tests;).

You need to add this check into get_visible_state() and
check_visible_state().


More information about the CRIU mailing list