Date: Sun, 16 Oct 2011 19:57:57 +0300 From: Mikolaj Golub <trociny@freebsd.org> To: freebsd-hackers@freebsd.org Cc: Kostik Belousov <kib@FreeBSD.org>, Robert Watson <rwatson@freebsd.org> Subject: "ps -e" without procfs(5) Message-ID: <86y5wkeuw9.fsf@kopusha.home.net>
next in thread | raw e-mail | index | archive | help
Hi, I have a patch that makes kvm_uread() read from user space using ptrace(2). http://people.freebsd.org/~trociny/kvm_uread.ptrace.patch With this change 'ps -e' does not requires procfs(5). Do you like it or there might be some reasons why it is a bad idea? Grepping sources it looks like currently only ps uses kvm_getenvv(3) (and thus kvm_uread()). Note, when reading from its own user space it just does bcopy(3), so if a wrong address range is passed to kvm_uread() the program will segfault. Do we need some protection here and what? Masking SIGSEGV? -- Mikolaj Golub
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86y5wkeuw9.fsf>