[CRIU] [PATCH 16/21] restore: construct sigframe in crtools

Alexander Kartashov alekskartashov at parallels.com
Sun May 26 13:52:48 EDT 2013


On 05/26/2013 09:29 PM, Pavel Emelyanov wrote:
> On 05/26/2013 05:05 PM, Alexander Kartashov wrote:
>> On 05/24/2013 04:20 PM, Andrey Vagin wrote:
>>> -	if (restore_fpu(sigframe, &rsigframe->fpu_state))
>>> -		return -1;
>>> +	if (sigframe->fpu_state.has_fpu)
>>> +		if (restore_fpu(sigframe, &rsigframe->fpu_state))
>>> +			return -1;
>> This hunk results in a SEGFAULT in the ARM version crtools
>> since the ARM version of the routine restore_fpu()
>> accesses the second argument unlike the x86 version
>> but the pointer rsigframe is valid in the dumpee address space.
>>
>> I'm afraid the routine construct_sigframe() needs redesign.
>>
>
> Andrew, please, help Alexander.

It seem's I've figured out what should be done: memcpy() must be removed
from the ARM version of the routine restore_fpu() and the routine is to be
renamed to sigreturn_prep_fpu_frame() and vice versa to prevent confusion.
Is it OK for you, Andrew? If so, I'll send a renaming patch once I fix 
the ARM
version of CRIU.

-- 
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