From 9fc355eee445aa5e553eae17cd105a304265288c Mon Sep 17 00:00:00 2001 From: "Anthony J. Bentley" Date: Sun, 5 Nov 2017 17:06:09 -0700 Subject: [PATCH] Use W^X on OpenBSD. --- Common/MemoryUtil.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Common/MemoryUtil.cpp b/Common/MemoryUtil.cpp index 7ea29b9715..36c7c74088 100644 --- a/Common/MemoryUtil.cpp +++ b/Common/MemoryUtil.cpp @@ -284,9 +284,9 @@ void FreeAlignedMemory(void* ptr) { } bool PlatformIsWXExclusive() { - // Only iOS really needs this mode currently. Even without block linking, still should be much faster than IR JIT. + // Needed on platforms that disable W^X pages for security. Even without block linking, still should be much faster than IR JIT. // This might also come in useful for UWP (Universal Windows Platform) if I'm understanding things correctly. -#if defined(IOS) || PPSSPP_PLATFORM(UWP) +#if defined(IOS) || PPSSPP_PLATFORM(UWP) || defined(__OpenBSD__) return true; #else // Returning true here lets you test the W^X path on Windows and other non-W^X platforms.