This set of patches purposes changing MIRA_GET_PROC_INFORMATION ioctl by separating thread information to a new ioctl, MIRA_GET_THRD_INFORMATION, along with some new information fields for GET_PROC_INFORMATION.
The motivations for this are retrieval of additional information and improved ease of use for callers.
Other included changes are:
Remove Threads field from MiraProcessInformation, and use fixed numbers for its strings.
If the requested PID is 0, assume the caller wants its own process' information.
Pass the number of threads retrieved to the caller
Use (musl's implementation of) strlcpy to safely copy process and thread strings
Replaced offset references of title ID with p_titleid field.
If the ioctl split is unwanted (or anything else), I can rework the patches as desired.
This was tested on a Base PS4 9.00, LLVM 16.0.3, on top of the chendo-offset-fix branch and the patches of #162
EDIT:
Other firmware offsets for title ID and content ID are unconfirmed
This set of patches purposes changing MIRA_GET_PROC_INFORMATION ioctl by separating thread information to a new ioctl, MIRA_GET_THRD_INFORMATION, along with some new information fields for GET_PROC_INFORMATION.
The motivations for this are retrieval of additional information and improved ease of use for callers. Other included changes are:
If the ioctl split is unwanted (or anything else), I can rework the patches as desired.
This was tested on a Base PS4 9.00, LLVM 16.0.3, on top of the chendo-offset-fix branch and the patches of #162
EDIT: Other firmware offsets for title ID and content ID are unconfirmed