xenia
xenia copied to clipboard
[Kernel/Memory] Check for required protect_bits
There are situations where titles can execute MmSetAddressProtect
without one of basic protection flags. (Their state would be undefined!)
I was thinking about creating constexpr in header file somewhere instead of function body. Additionally feel free to provide better name for it. Thanks 😸
Theory:
These protection changes should be omitted as there is no way to define new state.
I was thinking if it could be correct to just append these new flags to actual state of page, however we would need to check if every page is defined, as there might be situation where we try to change it over unallocated space and cause 🔥
(Update: However note in BaseHeap::Protect
suggest that indeed these cases should be omitted)
Affected Titles:
https://github.com/xenia-project/game-compatibility/issues/1781 https://github.com/xenia-project/game-compatibility/issues/146