[CRIU] [PATCH 20/23] ptrace.c: don't seize the task that doesn't run in the userspace

Pavel Emelyanov xemul at parallels.com
Mon Jan 14 05:24:55 EST 2013


On 01/14/2013 02:19 PM, Alexander Kartashov wrote:
> On 01/14/2013 02:09 PM, Pavel Emelyanov wrote:
>> Infection happens only after task gets stopped
>> by tracer.
> 
> The problem is that the task may execute the code
> outside the userspace when it's stopped. It's not
> strictly speaking a kernel code since it's mapped
> to the userspace but it's reas-only.
> 
> ARM has a peculiar implementation of cmpxchg:
> the program that wants to use it jumps to some address
> above TASK_SIZE, the kernel traps the jumps and
> does needed work. In this case PC is above TASK_SIZE
> but we are not executing the kernel code. 

And is task stopped/trapped in this case?

> The patch prevents seizing the task in this state.
> 




More information about the CRIU mailing list