task_read_for_pid on 11.0

I just encountered this function and wondering if that means that task_read_t is only read permission for the target task i.e. mach_vm_read
And is that a private capability of apple only binaries?

Thank you!

Accepted Reply

Apple has been progressively evolving the kernel to separate task ports into various flavours, each with a specific subset of capabilities. The mach_task_flavor_t values in <mach/mach_types.h> are just the next step in this evolution.

And is that a private capability of apple only binaries?

AFAIK task_read_for_pid isn’t in a public header and thus is not considered API.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"

Replies

Apple has been progressively evolving the kernel to separate task ports into various flavours, each with a specific subset of capabilities. The mach_task_flavor_t values in <mach/mach_types.h> are just the next step in this evolution.

And is that a private capability of apple only binaries?

AFAIK task_read_for_pid isn’t in a public header and thus is not considered API.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"
Hi Stylo,

Yes, this is correct. task_read_t can be considered as a read-only alternative to task port task_t for use on interfaces that are considered non-modifying on target task (e.g. mach_vm_read as you mentioned). At this time, this type is only exported to Apple platform binaries.