From 93054c5c3ceb70ffbf72ac39dcc909527f167c8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz=20=28arab=2C=20vx?= =?UTF-8?q?p=29?= Date: Mon, 7 Mar 2016 15:07:12 +0100 Subject: Set protect=NT_PAGE_NOACCESS when prot=0 in libpsxscl!__sys_mmap(). Fixes Irssi (part 1.) --- psxscl.local.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/psxscl.local.patch b/psxscl.local.patch index a00c77b2..491b7cc4 100644 --- a/psxscl.local.patch +++ b/psxscl.local.patch @@ -135,3 +135,16 @@ index a623d2a..80dd4a9 100644 image->info.hfile))) return __execve_return(tlca,0,target,-ENOEXEC); +--- psxscl/src/mman/_mmap.c.orig 2016-03-07 14:29:56.539765500 +0100 ++++ psxscl/src/mman/_mmap.c 2016-03-07 14:37:21.460223800 +0100 +@@ -95,7 +95,9 @@ + return (void *)__psx_sig_epilog(m.tlca,-EINVAL,EPSXONLY); + + /* protection */ +- if (__psx_convert_flags_to_native( ++ if (!prot) ++ m.cprot = NT_PAGE_NOACCESS; ++ else if (__psx_convert_flags_to_native( + __mmap_section_prot, + prot,&m.cprot,0)) + return (void *)__psx_sig_epilog(m.tlca,-EINVAL,EPSXONLY); -- cgit v1.2.3