Skip to contentSkip to conversation

LOWRAM mmap: Invalid argument

DISCUSSION ivan 3 participants 4 messages Apr 12, 2008 – Sep 20, 2010

lore
Share & tools
lore

ivan

author
#0 lore raw

Hello,

Dosemu doesn't run any more. I use latest ubuntu hardy (frequently updated) on 3 different machines (both ia32 and amd64) and the last time I remember dosemu working was about 2 weeks ago. Today, all I got was the following error message:

$ dosemu
LOWRAM mmap: Invalid argument
Segmentation fault (core dumped)

I tried from X and from the console, all 3 computers, result the same. Some dependency had to break dosemu. Google doesn't give any hints about LOWRAM mmap. So, anyone has an idea?

Thanks a lot
Ivan

#1 lore raw

Hi,

you can check the value of
/proc/sys/vm/mmap_min_addr
and if it is non-zero, use
echo 0 > /proc/sys/vm/mmap_min_addr

I am not sure what Ubuntu has been up to exactly: this is something that only works with SELinux enabled in enforcing mode.

This is the help:
+config SECURITY_DEFAULT_MMAP_MIN_ADDR

+        int "Low address space to protect from user allocation"
+        depends on SECURITY
+        default 0
+        help
+         This is the portion of low virtual memory which should be protected
+         from userspace allocation.  Keeping a user from writing to low pages
+         can help reduce the impact of kernel NULL pointer bugs.
+
+         For most users with lots of address space a value of 65536 is
+         reasonable and should cause no problems.  Programs which use vm86
+         functionality would either need additional permissions from either
+         the LSM or the capabilities module or have this protection disabled.

+
+ This value can be changed after boot using the
+ /proc/sys/vm/mmap_min_addr tunable.
+
+

I am not sure how to give DOSEMU special permission -- maybe you could ask Ubuntu kernel maintainers about why they changed mmap_min_addr?

(o and this is speculation on my part, perhaps there is a different problem in which case I don't know).

Bart

author
#2 lore raw
Quoted 6 lines · Bart Oldeman

Hi,

you can check the value of
/proc/sys/vm/mmap_min_addr
and if it is non-zero, use
echo 0 > /proc/sys/vm/mmap_min_addr

That's exactly it. Big thanks.

Ivan

Quoted 30 lines

I am not sure what Ubuntu has been up to exactly: this is something that only works with SELinux enabled in enforcing mode.

This is the help:

(quoted diff) +18 -0
+config SECURITY_DEFAULT_MMAP_MIN_ADDR
+        int "Low address space to protect from user allocation"
+        depends on SECURITY
+        default 0
+        help
+         This is the portion of low virtual memory which should be protected
+         from userspace allocation.  Keeping a user from writing to low pages
+         can help reduce the impact of kernel NULL pointer bugs.
+
+         For most users with lots of address space a value of 65536 is
+         reasonable and should cause no problems.  Programs which use vm86
+         functionality would either need additional permissions from either
+         the LSM or the capabilities module or have this protection disabled.
+
+         This value can be changed after boot using the
+         /proc/sys/vm/mmap_min_addr tunable.
+
+

I am not sure how to give DOSEMU special permission -- maybe you could ask Ubuntu kernel maintainers about why they changed mmap_min_addr?

(o and this is speculation on my part, perhaps there is a different problem in which case I don't know).

Bart