Attached is a patch which introduces a new LSM hook,security_task_lookup. This hook allows an LSM to mediate visibility of/proc/<pid> on a per-pid level. The bsdjail lsm which will be sentnext is a user of this hook.