Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 152372 - app-emulation/dosemu error if /dev/shm is mounted "noexec"
Summary: app-emulation/dosemu error if /dev/shm is mounted "noexec"
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: Hanno Böck
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-22 06:45 UTC by norbert kamenicky
Modified: 2007-04-02 21:34 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description norbert kamenicky 2006-10-22 06:45:49 UTC
if /dev/shm is mounted "noexec" (which is default AFAIK)
dosemu-1.3.3 fails with this error:
ERROR: MAPPING: cannot map temp file pool, Operation not permitted

It's very interesting, because it fails on this system call: (output from strace)

mmap2(NULL, 15794176, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_SHARED, 6, 0) = -1 EPERM (Operation not permitted)

while trying to call mmap(2) with "PROT_EXEC" flag on noexec protected device

i.e. a patch is needed to make it work with /dev/shm mounted "noexec"
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-10-22 08:06:23 UTC
Change $_mapping from "auto" to "mapashm" in /etc/dosemu/dosemu.conf 
Comment 2 Stefaan De Roeck (RETIRED) gentoo-dev 2006-12-30 05:28:11 UTC
Solution works for me at least
Comment 3 norbert kamenicky 2006-12-30 14:38:12 UTC
(In reply to comment #1)
> Change $_mapping from "auto" to "mapashm" in /etc/dosemu/dosemu.conf 
> 

Yes, this solution really works, so please do it default in /etc/dosemu/dosemu.conf and the bug can be closed.

Thanks
Comment 4 John Lawless 2007-03-21 01:14:41 UTC
> Change $_mapping from "auto" to "mapashm" in /etc/dosemu/dosemu.conf 

That did NOT work for me but remounting /dev/shm to exec did work.
Comment 5 Hanno Böck gentoo-dev 2007-04-02 21:34:40 UTC
fixed in global dosemu.conf, though this might be overwritten by local config