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

Stanislav Kinsburskiy skinsbursky at virtuozzo.com
Thu Jul 7 02:43:59 PDT 2016



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.



More information about the CRIU mailing list