Date: Wed, 15 Jun 2011 16:37:15 +0200 From: Joerg Wunsch <freebsd-current@uriah.heep.sax.de> To: freebsd-stable@freebsd.org Cc: Kostik Belousov <kostikbel@gmail.com>, Jeremy Chadwick <freebsd@jdc.parodius.com> Subject: Re: doscmd under 8-stable, anyone? Message-ID: <20110615143715.GR23206@uriah.heep.sax.de> In-Reply-To: <20110615140051.GL48734@deviant.kiev.zoral.com.ua> <20110615141240.GA61227@icarus.home.lan>
next in thread | previous in thread | raw e-mail | index | archive | help
As Kostik Belousov wrote: > > So does anyone have an idea > > why this mmap() call: ... > > yields an EINVAL now under 8-stable? > > Do sysctl security.bsd.map_at_zero=1 Ah, thanks! Now it works. Well, at least it doesn't crash anymore (I somehow have to fix my boot environment, hopefully I'll be able to perform a fresh installation of FreeDOS there.) So I guess this should be added to doscmd's documentation then. As Jeremy Chadwick wrote: > I'm not sure why a person would need or want MAP_FIXED in this > situation; why can't they just take the result of mmap() (a void *) and > use that as a base address offset instead of assuming zero in their > software? Because MS-DOS utilities are written in the assumption of running at address 0 (or only slightly beyond). Remember, this mmap() maps the MS-DOS emulator base memory (that's why it is fatal if the allocation fails). -- cheers, J"org .-.-. --... ...-- -.. . DL8DTL http://www.sax.de/~joerg/ NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110615143715.GR23206>