[CRIU] About ashmem and Deleted Pages

Christopher Covington cov at codeaurora.org
Tue Apr 5 11:40:26 PDT 2016


On 03/30/2016 06:08 AM, Pavel Emelyanov wrote:
> On 03/30/2016 11:16 AM, Abdullah Yousafzai wrote:
>> Sorry for a bit late reply, Please find the attachment
> 
> OK, so the "bogus" mapping is
> 
> 12c00000-12e01000 r--p 00000000 00:05 5475                               /dev/ashmem/dalvik-main space (deleted)
> 
> It's been detected as such because
> 
> a) it's private (the 'p' letter in the 2nd column)
> b) it's detected and MAP_SHARED | MAP_ANON (criu created the MAP_SHARED | MAP_ANON mapping
>    and found 00:05 device in the 4th column)
> 
> So in order to fix this we need a way to distinguish the anonymouns shared
> memory from dalvik ashmem. Can you help with it, because none of us has
> kernel experience with android?

Possibilities that come to mind for me are string matching "/dev/ashmem"
and/or trying one of the ashmem-specific IOCTLs like ASHMEM_GET_NAME.

I don't have real personal experience with ashmem, but based the above
on some quick reading, links below for anyone who might want to do the same.

http://elinux.org/Android_Kernel_Features#ashmem

http://stackoverflow.com/questions/9970858/what-special-powers-does-ashmem-have

http://notjustburritos.tumblr.com/post/21442138796/an-introduction-to-android-shared-memory

http://thread.gmane.org/gmane.linux.kernel/1168763

http://lxr.free-electrons.com/source/drivers/staging/android/ashmem.c

Cheers,
Cov

-- 
Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project


More information about the CRIU mailing list