LightBlog

jeudi 5 mars 2015

[Q] SIGSTOP signal cannot freeze kernel mode process

Hello,



I'm trying to create a kernel level mechanism that freezes processes.

So far I've been successful in doing so in some cases but whenever I have

a process running in kernel mode, this mechanism fails.



More precisely I have an Android app that launches two java.lang.Process

instances where each of which issue a shell ping command.

At this point I can see that the app and both processes are in the

sleeping state (S), meaning that their processes are in kernel mode, and

waiting for some syscall to terminate (possibly recvmsg or sendmsg).

In the kernel, I send a signal (SIGSTOP) to one of the ping processes to

freeze it.

I then check the state of the process and I can see that it actually

transitioned from the sleeping to the stopped state (T).

However, when I use strace on that ping process, it shows continuous

socket activity, which means that despite the state of the process, the

signal had no effect on the ping process's kernel level execution.



I would like to know if anyone can help me answer two questions:

Is this behavior normal?

Is there a way to freeze kernel level execution such as a system call?



Linux kernel: goldfish 3.4

Android: KitKat 4.4 r1.2



Thank you very much in advance

Best Regards

pfreezer





from xda-developers http://ift.tt/1A0oclj

via IFTTT

Aucun commentaire:

Enregistrer un commentaire