Date: Fri, 28 Aug 2009 23:01:08 +0100 From: Bruce Cran <bruce@cran.org.uk> To: Chris St Denis <chris@smartt.com> Cc: freebsd-bugs@FreeBSD.org Subject: Re: bin/130343: top(1): kvm_open: cannot open /proc/42997/mem corrupts screen output Message-ID: <20090828230108.2ac0145b@gluon.draftnet> In-Reply-To: <200908281810.n7SIA6Oq066948@freefall.freebsd.org> References: <200908281810.n7SIA6Oq066948@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
It looks the "-a" option is triggering the fault. kvm_getargv (in lib/libkvm/kvm_proc.c) attempts to read the argv array using sysctl; if that fails then it calls kvm_doargv which attempts to read the array from the process' memory (via kvm_uread) by opening /proc/%d/mem (kvm_proc.c line 997). -- Bruce Cran
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090828230108.2ac0145b>