From 40c0696e76ca685f7334716461d13816e852ac3e Mon Sep 17 00:00:00 2001 From: Pavel Durov Date: Tue, 9 Apr 2024 16:32:01 +0100 Subject: [PATCH] Remove PROT_EXEC from mprotect. --- ykrt/src/trace/swt/patch.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ykrt/src/trace/swt/patch.rs b/ykrt/src/trace/swt/patch.rs index 5b857a9eb..079e607b3 100644 --- a/ykrt/src/trace/swt/patch.rs +++ b/ykrt/src/trace/swt/patch.rs @@ -75,7 +75,7 @@ unsafe fn patch_function(function_ptr: usize, code: *const u8, size: size_t) { let result = mprotect( func_address, page_size_aligned, - PROT_READ | PROT_WRITE | PROT_EXEC, + PROT_READ | PROT_WRITE, ); if result != 0 { panic!("Failed to change memory protection to be writable");