Repository navigation
fix(libkernel): fail madvise MADV_PROTECT with EPERM - #3795
13hourstilliland wants to merge 1 commit into
Conversation
14d6d28 to
2975897
Compare
2975897 to
0e00e27
Compare
|
Which title calls |
|
No title: I can't give a title ID or a log line where a title calls If title evidence is the bar for this kind of turn, close it until a title calls it. |
|
Closing as agreed in the thread: @oneandonlydean asked which title calls Feel free to reopen, rebased, once a title ID and the log line where it stops on |
What
madvisethrew onMADV_PROTECT. It now fails withEPERM, as an unprivileged process does on FreeBSD 11.4. There,MADV_PROTECTis handled before the address and length checks and becomesPROC_SPROTECT. That call requiresPRIV_VM_MADV_PROTECT. This keeps the same order, so an invalid range withMADV_PROTECTstill getsEPERM. Whether PS5 titles hold that privilege isn't verified; it's noted in TechnicalDebt.Tested
Linux (GCC 14.2):
guest_memorychecks thatMADV_PROTECTreturns -1 with errno 1 on a mapped page and on an out-of-range address. The test aborts on currentmainand passes with this change.check_conventions.pypasses. Not tested with a title.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)