Date: Wed, 15 Jun 2011 17:00:51 +0300 From: Kostik Belousov <kostikbel@gmail.com> To: Joerg Wunsch <joerg@freebsd.org> Cc: freebsd-stable@freebsd.org Subject: Re: doscmd under 8-stable, anyone? Message-ID: <20110615140051.GL48734@deviant.kiev.zoral.com.ua> In-Reply-To: <20110615135704.GQ23206@uriah.heep.sax.de> References: <20110615135704.GQ23206@uriah.heep.sax.de>
next in thread | previous in thread | raw e-mail | index | archive | help
--+YUTx28Pm90FnKYj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 15, 2011 at 03:57:05PM +0200, Joerg Wunsch wrote: > When trying to use doscmd on 8-stable, all I get is: >=20 > Error mapping HMA, HMA disabled: : Invalid argument > Segmentation fault (core dumped) >=20 > The segfault happens at the end of mem_init(), when the allocated DOS > memory (which is located at virtual address 0) is attempted to be > written to. Apparently, the mmap() failure that causes the "HMA > disabled" message is actually a fatal error rather than a benign one > the could be ignored, as it results in no valid DOS memory allocation > at all. >=20 > Right now, the only older system I could test it against uses FreeBSD > 5.x, where the mmap() works as expected. So does anyone have an idea > why this mmap() call: >=20 > if (mmap((caddr_t)0x000000, 0x100000, > PROT_EXEC | PROT_READ | PROT_WRITE, > MAP_ANON | MAP_FIXED | MAP_SHARED, > -1, 0) =3D=3D MAP_FAILED) { > perror("Error mapping HMA, HMA disabled: "); > HMA_a20 =3D -1; > close(HMA_fd_off); > close(HMA_fd_on); > return; > } >=20 > yields an EINVAL now under 8-stable? Do sysctl security.bsd.map_at_zero=3D1 --+YUTx28Pm90FnKYj Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAk34uxMACgkQC3+MBN1Mb4i7ZwCgzIlY8O+tC8lnzzAZTzdlzDry yIIAni7u2Ec+QVcRLcYinmmASniovBgg =kXPb -----END PGP SIGNATURE----- --+YUTx28Pm90FnKYj--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110615140051.GL48734>