bin/130343: top(1): kvm_open: cannot open /proc/42997/mem corrupts screen output

Bruce Cran bruce at cran.org.uk
Fri Aug 28 22:19:38 UTC 2009


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


More information about the freebsd-bugs mailing list