[CRIU] [PATCH] zdtm.py: check permissions for memory mappings
Pavel Emelyanov
xemul at virtuozzo.com
Thu Jul 14 04:02:55 PDT 2016
On 07/13/2016 08:19 PM, Andrew Vagin wrote:
> On Wed, Jul 13, 2016 at 03:33:19PM +0300, Pavel Emelyanov wrote:
>> On 06/27/2016 05:52 PM, Andrey Vagin wrote:
>>> From: Andrew Vagin <avagin at virtuozzo.com>
>>
>> Andrey, will current criu-dev pass with this patch? If not what patches
>> do we need to make it passing?
>
> It was attempt to wirte a test for Stas' patch:
> proc_parse: fix vma file open mode recognition
>
> But it doesn't catch the origin problem and trigger another one:
> https://github.com/xemul/criu/issues/180
OK, so what do we do with __this__ patch:
a) apply one and go on
b) apply one and have a bunch of failures in jenkins
c) drop one and wait for better version
?
>>
>>> Signed-off-by: Andrew Vagin <avagin at virtuozzo.com>
>>> ---
>>> test/zdtm.py | 7 ++++---
>>> 1 file changed, 4 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/test/zdtm.py b/test/zdtm.py
>>> index 9454399..7aed548 100755
>>> --- a/test/zdtm.py
>>> +++ b/test/zdtm.py
>>> @@ -917,16 +917,17 @@ def get_visible_state(test):
>>> for pid in pids:
>>> files[pid] = set(os.listdir("/proc/%s/root/proc/%s/fd" % (test.getpid(), pid)))
>>>
>>> - cmaps = [[0, 0]]
>>> + cmaps = [[0, 0, ""]]
>>> last = 0
>>> for mp in open("/proc/%s/root/proc/%s/maps" % (test.getpid(), pid)):
>>> m = map(lambda x: int('0x' + x, 0), mp.split()[0].split('-'))
>>> - if cmaps[last][1] == m[0]:
>>> + m.append(mp.split()[1])
>>> + if cmaps[last][1] == m[0] and cmaps[last][2] == m[2]:
>>> cmaps[last][1] = m[1]
>>> else:
>>> cmaps.append(m)
>>> last += 1
>>> - maps[pid] = set(map(lambda x: '%x-%x' % (x[0], x[1]), cmaps))
>>> + maps[pid] = set(map(lambda x: '%x-%x %s' % (x[0], x[1], x[2]), cmaps))
>>>
>>> cmounts = []
>>> try:
>>>
>>
> .
>
More information about the CRIU
mailing list