[CRIU] [PATCH 3/3] arm64: detect vDSO remaps

Alexander Kartashov alekskartashov at parallels.com
Tue Mar 11 23:15:13 PDT 2014


On 03/12/2014 10:03 AM, Cyrill Gorcunov wrote:
> On Wed, Mar 12, 2014 at 10:05:50AM +0400, Alexander Kartashov wrote:
>> On 03/11/2014 02:51 PM, Cyrill Gorcunov wrote:
>>> Alexander, there is aspect I don't understand (you might be explaining
>>> me but I start to doubt again). Here is what we have on x86-64
>>>
>>>   - once proceess starts up the kernel provides vDSO area for it
>>>   - if such vdso area intersects with image addresses we
>>>    - remap runtime vdso to a new free address with MAP_FIXED
>>>    - map old vDSO from image to original address then proxify it if needed
>>>
>>> how it's different from ARM64?
>> It's exactly the same but for tiny nuance: the kernel initializes
>> some variables in the arm64 specific part of a task_struct
>> when a process is created binding them to vDSO symbols:
>> particularly the signal trampoline is situated in the vDSO
>> and the kernel stores its address in the task struct.
>> This means it's impossible to remap the vDSO area without
>> breaking signal handling.
>>
>> This patch copes with this problem by adjusting the task struct
>> when the vDSO area is remapped.
> What a crap ;) Could you point which exactly variable in task struct
> bound to vdso address?

I'm sorry it's not task struct but mm struct but this doesn't make
any difference. The problem initialization is this 
http://lxr.free-electrons.com/source/arch/arm64/kernel/vdso.c#L171

-- 
Sincerely yours,
Alexander Kartashov

Intern
Core team

www.parallels.com

Skype: aleksandr.kartashov
Email: alekskartashov at parallels.com



More information about the CRIU mailing list