mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-26 21:06:53 +01:00
memory: avoid redundant Windows view protection
This commit is contained in:
@@ -60,6 +60,12 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if KYTY_PLATFORM == KYTY_PLATFORM_WINDOWS
|
||||
namespace Libs::LibKernel::Memory {
|
||||
bool TestWindowsBackingViewModes();
|
||||
}
|
||||
#endif
|
||||
|
||||
namespace Libs::Fiber {
|
||||
struct FiberObject;
|
||||
struct FiberOptParam;
|
||||
@@ -1355,6 +1361,15 @@ void TestPartialUnmapPreservesHostPermissions() {
|
||||
}
|
||||
#endif
|
||||
|
||||
#if KYTY_PLATFORM == KYTY_PLATFORM_WINDOWS
|
||||
void TestWindowsBackingViewPermissions() {
|
||||
const char* test = "WindowsBackingViewPermissions";
|
||||
Check(test, Libs::LibKernel::Memory::TestWindowsBackingViewModes(),
|
||||
"backing view permissions differ from the requested mode");
|
||||
std::printf("[host] %-48s ok\n", test);
|
||||
}
|
||||
#endif
|
||||
|
||||
void TestDirectMapValidationBeforeOwnerMutation() {
|
||||
const char* test = "DirectMapValidationBeforeOwnerMutation";
|
||||
int64_t invalid = -1;
|
||||
@@ -4248,6 +4263,9 @@ int main(int argc, char** argv) {
|
||||
RunTest(TestDirectPartialProtectUnmapPreservesNeighbors);
|
||||
#if defined(__linux__)
|
||||
RunTest(TestPartialUnmapPreservesHostPermissions);
|
||||
#endif
|
||||
#if KYTY_PLATFORM == KYTY_PLATFORM_WINDOWS
|
||||
RunTest(TestWindowsBackingViewPermissions);
|
||||
#endif
|
||||
RunTest(TestDirectMapValidationBeforeOwnerMutation);
|
||||
RunTest(TestDirectReleaseRollbackRestoresOwnerMapping);
|
||||
|
||||
Reference in New Issue
Block a user