Skip to content

Conversation

pipehuffer
Copy link

@pipehuffer pipehuffer commented Jun 11, 2023

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

Leonid Pavel added 4 commits June 11, 2023 04:12
These breaking changes on the GetProcInformation ioctl include:

- Remove dynamically sized threads array (to be moved into a different ioctl)

- Use fixed sized data ioctl data structure

- Use caller's PID if the requested one is 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant