fix(libkernel): accept GPU coherency prot bits for host mapping #550
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/550"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by Pouare514 on 2026-10-04T19:04:37Z.
What
Deathloop maps direct memory with prot 0x3f2 (read/write plus GPU/coherency bits 8-9). LinuxProtFromSce rejected anything outside 0xF7, aborting the title. The extra bits do not affect host CPU page tables (protection is derived solely from the known R/W/X bits, as with the already-tolerated bits 6-7), so they are now accepted and ignored for the host mapping.
Tested
Checklist
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-04T21:19:33Z.
Thanks. The change is safe for CPU access (the host protection still comes only from the read, write and exec bits, as for bits 6 and 7), and the new
guest_memorycase fails without it. The only thing missing is where bits 8 and 9 come from: the description calls them GPU/coherency bits. If that's from a header or the kernel, could you name the source in the description? If it's inferred from the title's values, a line under "Unknown function info" in TechnicalDebt saying that protection bits 0x100 and 0x200 are accepted and assumed not to affect CPU access would cover it. Then it's ready to merge from my side.Imported from boykopovar/AnyPS5. Originally posted by Pouare514 on 2026-10-04T22:54:41Z.
Done: added an Unknown function info line in TechnicalDebt for protection bits 0x100 and 0x200 (accepted, assumed not to affect host CPU access).
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-04T23:43:49Z.
Thanks, the TechnicalDebt line covers it. It conflicts with main now in TechnicalDebt.md (only that file); after a rebase that keeps both sides it's ready to merge from my side.
guest_memorypasses here with the conflict resolved that way.Imported from boykopovar/AnyPS5. Originally posted by Pouare514 on 2026-10-05T00:23:00Z.
Rebased onto current main, keeping both sides in TechnicalDebt.md. guest_memory passes locally.
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-05T01:18:13Z.
Thanks for the rebase. It's the same change with the TechnicalDebt line, merges cleanly with main now,
guest_memorypasses here, and CI is green. Ready to merge from my side.#338, #407 and #545 also append to the end of "Unknown function info", so whichever of them lands after this one will need a one-line TechnicalDebt rebase.
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-05T02:47:16Z.
#338 is on main now, so this needs the one-line rebase I mentioned: in docs/dev/TechnicalDebt.md, #338 adds ten "unknown signature" lines at the end of "Unknown function info", right where your
LinuxProtFromSceline goes. Keep main's lines and add yours after them. Nothing else conflicts, and after that it's ready to merge from my side.Imported from boykopovar/AnyPS5. Originally posted by Pouare514 on 2026-10-05T13:23:52Z.
Rebased onto current main. Kept #338's ten unknown-signature lines in docs/dev/TechnicalDebt.md and placed the LinuxProtFromSce line after them at the end of the Unknown function info section. Nothing else changed: prot mask fix (~0x3F7) and GuestMemory test intact, TD diff is one added line only.
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-06T05:34:14Z.
Thanks, the TechnicalDebt resolution is right, and the fix and test are unchanged.
Since then #686 has landed, so it conflicts in two places:
core/libs/tests/GuestMemory.cpp: #686 addedCheckReleaseDirectMemoryClearsMappings()where yourCheckDirectMemoryGpuProtBits()goes. Keep both functions and both calls inmain().docs/dev/TechnicalDebt.md: the end of "Unknown function info" has four new lines (_sceUlobjmgrRegisterObject,sceShareGetCurrentStatus,sceAgcDcbSet*PredicationEnableGetSize,Resource registration). Keep them and add yourLinuxProtFromSceline after them.Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-07T15:46:25Z.
Rebased onto current main (#686 conflicts):
GuestMemory.cppkeeps bothCheckReleaseDirectMemoryClearsMappingsandCheckDirectMemoryGpuProtBitswith both calls; the TechnicalDebt line now sits mid-section (aftersceKernelReadv) so later appends don't conflict with it.guest_memoryfails without the mask change and passes with it.libAmpr) names 0x100/0x200PROT_ACP_READ/PROT_ACP_WRITE, which supports treating them as non-CPU bits.Merging once CI is green.
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-07T15:53:51Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)docs/dev/TechnicalDebt.mdL188