Difference between revisions of "Kernel Task"

From The iPhone Wiki
Jump to: navigation, search
(Explaining the kernel_task)
 
Line 1: Line 1:
The kernel_task is XNU's task object which abstracts the kernel itself. As a task object, it contains the ports used by the kernel: threads, virtual memory, exception and others. Unlike other task objects, however, it does not have a mapping to a BSD process. Thus, the corresponding PID for the kernel is PID 0.
+
The kernel_task is XNU's [[task]] object which abstracts the kernel itself. As a task object, it contains the ports used by the kernel: threads, virtual memory, exception and others. Unlike other task objects, however, it does not have a mapping to a BSD process. Thus, the corresponding PID for the kernel is PID 0.
   
 
The kernel_task is accessible by a variety of means in OS X's XNU. In iOS, however, Apple do their damnedest to keep anyone from obtaining the task port. This is because, given the kernel_task, various task APIs can be called to manipulate it. Chief amongst those would be virtual memory APIs (e.g. mach_vm_read and mach_vm_write) which compromise system security and allow various forms of injection. Whereas in OS X the processor set APIs can list all tasks, the same APIs in iOS leave out the kernel task.
 
The kernel_task is accessible by a variety of means in OS X's XNU. In iOS, however, Apple do their damnedest to keep anyone from obtaining the task port. This is because, given the kernel_task, various task APIs can be called to manipulate it. Chief amongst those would be virtual memory APIs (e.g. mach_vm_read and mach_vm_write) which compromise system security and allow various forms of injection. Whereas in OS X the processor set APIs can list all tasks, the same APIs in iOS leave out the kernel task.

Revision as of 01:35, 25 February 2012

The kernel_task is XNU's task object which abstracts the kernel itself. As a task object, it contains the ports used by the kernel: threads, virtual memory, exception and others. Unlike other task objects, however, it does not have a mapping to a BSD process. Thus, the corresponding PID for the kernel is PID 0.

The kernel_task is accessible by a variety of means in OS X's XNU. In iOS, however, Apple do their damnedest to keep anyone from obtaining the task port. This is because, given the kernel_task, various task APIs can be called to manipulate it. Chief amongst those would be virtual memory APIs (e.g. mach_vm_read and mach_vm_write) which compromise system security and allow various forms of injection. Whereas in OS X the processor set APIs can list all tasks, the same APIs in iOS leave out the kernel task.