Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Feb 2010 13:12:16 +0200
From:      Kostik Belousov <kostikbel@gmail.com>
To:        Fernando Apestegu?a <fernando.apesteguia@gmail.com>
Cc:        freebsd-emulation@freebsd.org
Subject:   Re: linprocfs proc/pid/mem Bad address
Message-ID:  <20100226111216.GE2489@deviant.kiev.zoral.com.ua>
In-Reply-To: <1bd550a01002260306t10e1d287wc634e47848020ddc@mail.gmail.com>
References:  <1bd550a01002251354v7ea3ede9r458c027b038280fc@mail.gmail.com> <20100226104147.GC2489@deviant.kiev.zoral.com.ua> <1bd550a01002260306t10e1d287wc634e47848020ddc@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--Uwl7UQhJk99r8jnw
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Feb 26, 2010 at 12:06:07PM +0100, Fernando Apestegu?a wrote:
> On Fri, Feb 26, 2010 at 11:41 AM, Kostik Belousov <kostikbel@gmail.com> w=
rote:
> > On Thu, Feb 25, 2010 at 10:54:02PM +0100, Fernando Apestegu?a wrote:
> >> Why /compat/linux/proc/<pid>/mem always reports "Bad address" ?
> >>
> >> I'm using 8.0-RELEASE-p2
> >>
> >> Thanks in advance.
> >
> > Reports when ? What is the operation you doing that causes this ?
>=20
> Oops, sorry. When trying to cat the file for example. In Linux the
> error reported is something like
> "No such process"
>=20
> >

mem provides access to the target process virtual address space as file.
Reading from the file at some offset returns corresponding sequence of
bytes present in the process virtual address space starting at the offset.
Since cat starts read at the file offset 0, and (almost) no processes
map the page at the address 0, you get this error.

--Uwl7UQhJk99r8jnw
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (FreeBSD)

iEYEARECAAYFAkuHrJAACgkQC3+MBN1Mb4iFfQCg06zRONQUpc4PPt5rvhJe3ofp
PPYAn3WRfatbWJ53oyU+3F/G/2s8ezZ1
=S4tH
-----END PGP SIGNATURE-----

--Uwl7UQhJk99r8jnw--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100226111216.GE2489>