summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de>2016-03-07 15:07:12 +0100
committerLucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de>2016-03-07 15:07:12 +0100
commit93054c5c3ceb70ffbf72ac39dcc909527f167c8a (patch)
tree01d50eae3793d087eac697d46c2ece72fbc109ec
parent04ed4f60958ef6773030594fa7eb5288435228b5 (diff)
downloadmidipix_build-93054c5c3ceb70ffbf72ac39dcc909527f167c8a.tar.bz2
midipix_build-93054c5c3ceb70ffbf72ac39dcc909527f167c8a.tar.xz
Set protect=NT_PAGE_NOACCESS when prot=0 in libpsxscl!__sys_mmap().
Fixes Irssi (part 1.)
-rw-r--r--psxscl.local.patch13
1 files changed, 13 insertions, 0 deletions
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);