kern - Do not allow calls to vmspace_president_count() from userland.
authorAntonio Huete Jimenez <tuxillo@quantumachine.net>
Sat, 22 Oct 2011 10:20:29 +0000 (12:20 +0200)
committerAntonio Huete Jimenez <tuxillo@quantumachine.net>
Sat, 22 Oct 2011 21:19:04 +0000 (23:19 +0200)
commitacdfde5e73417023e2740e25ae90519996401c2a
treebf3ff833d4d62d40616853e5e613ebc0bf23a69b
parentcef01e15fe912e0bb866742427c9afcbf4328d44
kern - Do not allow calls to vmspace_president_count() from userland.

- Processes' vm_map is not read in by kvm_proclist() thus we cannot
  call vmspace_president_count() which entirely relies on that.
- This fixes segfaults in ps(1), w(1) and fstat(1) when using -M
  and -N parameters.

Help-from: @corecode
sys/kern/kern_kinfo.c