fix(libSceAppContent): preserve ownership of shared add-on mount aliases #26229
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/26229"
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 MarrasFederico on 2026-11-23T14:06:16Z.
What
Two entitlements in
anyps5-entitlements.inican point at the same add-on directory with equivalent spellings (/addcont0and/addcont0/). On main, building the add-on list blocks the first entry's alias before the second entry resolves its host path, so the second lookup throwsfilesystem error: Guest mount is unavailableandsceAppContentGetAddcontInfoListaborts.AddonEntriesnow resolves every configured host path first and blocks the aliases afterwards. Each entry also keeps a normalized alias identity (ASCII case folded, leading and trailing slashes trimmed, the same rule the path resolver applies), andsceAppContentAddcontMountreturnsSCE_APP_CONTENT_ERROR_BUSYwhile another add-on that shares that identity is mounted, instead of mounting the same alias twice.The new
guest_appcontent_alias_collisiontest configures the two spellings and checks that both add-ons are listed, that the first mount exposes the content, that the second mount answers BUSY and leaves its output buffer untouched, that unmounting hides the content, and that the second entitlement can then mount and release the alias.Tested
nice -n 19 cmake --build build --parallel 7 --target guest_appcontent_entitlements_testsandctest --test-dir build -R '^(guest_appcontent_entitlements|guest_appcontent_alias_collision)$' --repeat until-fail:3at headdae181d23ad01e9759c24d536997e282fb9aec33—guest_appcontent_entitlementsandguest_appcontent_alias_collisioneach passed 3/3 (0.00–0.01 s).guest_appcontent_alias_collisionnow also registersCOLLIDEADDON0003 = /ADDCONT0/, verifying that mounting/ADDCONT0/returnsSCE_APP_CONTENT_ERROR_BUSY(0x80d90003) while/addcont0is mounted, leaves the caller buffer untouched, mounts/reads/unmounts cleanly after/addcont0is unmounted, and is followed by the same mount/read/unmount of/addcont0/.MountAliasIdentity(core/libs/prx/libSceAppContent/Export.cpp:79returningstatic_cast<char>(value)) failsguest_appcontent_alias_collisionatcore/libs/tests/GuestAppContentEntitlements.cpp:113(Require(sceAppContentAddcontMount(0, &thirdLabel, &thirdMount) == ErrorBusy)). Restored (887fdf0fc07db7e353b8c69b3e68a2eec4c799b898efae1037a94ad4997d9b42), rebuilt, and re-verified 3/3.core/libs/prx/libSceAppContent/Export.cpptomainfailedguest_appcontent_alias_collisionduringRequireConfigResolved(Guest mount is unavailable: No such file or directory [addcont0/]).Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-23T14:09:56Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
574785e4bc:tools/check_conventions.pypassed.guest_appcontent_entitlements_testsbuilt cleanly.guest_appcontent_entitlements,guest_appcontent_alias_collision):core/libs/prx/libSceAppContent/Export.cppreverted tomainand the new tests kept, the suite fails: Restoring the change makes it pass again.Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-23T18:44:49Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
92f8edcf56:tools/check_conventions.pypassed.guest_appcontent_entitlements_testsbuilt cleanly.guest_appcontent_entitlements,guest_appcontent_alias_collision):core/libs/prx/libSceAppContent/Export.cppreverted tomainand the new tests kept, the suite fails: Restoring the change makes it pass again.Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-23T18:48:00Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
dae181d23a:tools/check_conventions.pypassed.guest_appcontent_entitlements_testsbuilt cleanly.guest_appcontent_entitlements,guest_appcontent_alias_collision):core/libs/prx/libSceAppContent/Export.cppreverted tomainand the new tests kept, the suite fails: Restoring the change makes it pass again.Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-25T07:48:07Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the inspected implementation and tests support merging.
What I ran
Reviewed head
5c6bc01337ff609a57560df86ffb2286a5ce2777. I read the prepared description, commits, manifest, diff, all four changed files, and the path-alias resolver implementation at the pinned head. No commands or tests were run; no merged-preview check was performed.Results
Negative control
Not run by this review. The description reports negative controls that failed as expected and were reverted.
Findings
Blocking
None.
Non-blocking
None.
Not verified
Build/test results were not independently verified. Console add-on mounting behavior and error codes were not tested on hardware.
files.jsonwas not available as a review-folder file; the manifest lists all four changed files as included, and all four were read.To get this to a good state
Nothing is required.