From 3b03b9603c65960c15e738aea5a5ffe9a25305cf Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Wed, 9 Oct 2024 21:46:15 -0700 Subject: [PATCH] kern: specify allowable ipc client memory attr via inverted-whitelist, not blacklist --- libraries/libmesosphere/source/kern_k_page_table_base.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/libmesosphere/source/kern_k_page_table_base.cpp b/libraries/libmesosphere/source/kern_k_page_table_base.cpp index d141490ef..4ebaad0bd 100644 --- a/libraries/libmesosphere/source/kern_k_page_table_base.cpp +++ b/libraries/libmesosphere/source/kern_k_page_table_base.cpp @@ -3834,15 +3834,15 @@ namespace ams::kern { switch (dst_state) { case KMemoryState_Ipc: test_state = KMemoryState_FlagCanUseIpc; - test_attr_mask = KMemoryAttribute_Uncached | KMemoryAttribute_DeviceShared | KMemoryAttribute_Locked; + test_attr_mask = KMemoryAttribute_All & (~(KMemoryAttribute_PermissionLocked | KMemoryAttribute_IpcLocked)); break; case KMemoryState_NonSecureIpc: test_state = KMemoryState_FlagCanUseNonSecureIpc; - test_attr_mask = KMemoryAttribute_Uncached | KMemoryAttribute_Locked; + test_attr_mask = KMemoryAttribute_All & (~(KMemoryAttribute_PermissionLocked | KMemoryAttribute_DeviceShared | KMemoryAttribute_IpcLocked)); break; case KMemoryState_NonDeviceIpc: test_state = KMemoryState_FlagCanUseNonDeviceIpc; - test_attr_mask = KMemoryAttribute_Uncached | KMemoryAttribute_Locked; + test_attr_mask = KMemoryAttribute_All & (~(KMemoryAttribute_PermissionLocked | KMemoryAttribute_DeviceShared | KMemoryAttribute_IpcLocked)); break; default: R_THROW(svc::ResultInvalidCombination());