mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-12-05 00:50:52 +00:00
2.0 KiB
2.0 KiB
libkernel
change [kern.proc.pid]
- kern.proc.pid (libkernel) - what the console fills in a process's
kinfo_procis unverified;sysctl{CTL_KERN,KERN_PROC,KERN_PROC_PID, pid} for the calling process returns a 1,096-bytekinfo_proc, FreeBSD 11 amd64's 1,088 bytes (sys/sys/user.h) plus 8, as a firmware 11.60 payload reports it; here a 1,088-byte buffer getsENOMEMafter a 1,088-byte copy. It holds onlyki_structsize,ki_pid,ki_ppidandki_comm(eboot.bin, the base name of thekern.proc.pathnamevalue), with every other field 0, includingki_flag, soP_TRACED(0x800) is clear. Source Port (PPSA20040) asks for its own record with a 0x440-byte buffer and tests only bit 0x800 ofki_flagat offset 0x170, to see whether a debugger is attached. Other processes' pids and -1 fail withESRCH, a write withEPERMand a short buffer withENOMEM.
change [kern.proc.pid_td]
- kern.proc.pid_td (libkernel) - a PS5 payload process (firmware 11.60) answers {
CTL_KERN,KERN_PROC,KERN_PROC_PID | KERN_PROC_INC_THREAD, pid} withENOENT, so what the console fills in is unverified; here it returns onekern.proc.pidrecord per live guest thread, as FreeBSD 11.4'skern_proc_outdoes withoutKERN_PROC_NOTHREADS, withki_tid(thepthread_getthreadid_npvalue),ki_numthreads, and the thread name split asfill_kinfo_threadsplits it: up to 16 bytes inki_tdname, the next 3 inki_moretdname. Run time, CPU, state, priority and the other per-thread fields stay 0. As forkern.proc.pid, only the calling process is answered, by its pid or the id of one of its live threads: any other pid, -1 included, fails withESRCH, where FreeBSD'spgetalso answers for other visible processes.