freebsd-nq/sys/security
Konstantin Belousov d8b0556c6d Adapt vfs kqfilter to the shared vnode lock used by zfs write vop. Use
vnode interlock to protect the knote fields [1]. The locking assumes
that shared vnode lock is held, thus we get exclusive access to knote
either by exclusive vnode lock protection, or by shared vnode lock +
vnode interlock.

Do not use kl_locked() method to assert either lock ownership or the
fact that curthread does not own the lock. For shared locks, ownership
is not recorded, e.g. VOP_ISLOCKED can return LK_SHARED for the shared
lock not owned by curthread, causing false positives in kqueue subsystem
assertions about knlist lock.

Remove kl_locked method from knlist lock vector, and add two separate
assertion methods kl_assert_locked and kl_assert_unlocked, that are
supposed to use proper asserts. Change knlist_init accordingly.

Add convenience function knlist_init_mtx to reduce number of arguments
for typical knlist initialization.

Submitted by:	jhb [1]
Noted by:	jhb [2]
Reviewed by:	jhb
Tested by:	rnoland
2009-06-10 20:59:32 +00:00
..
audit Adapt vfs kqfilter to the shared vnode lock used by zfs write vop. Use 2009-06-10 20:59:32 +00:00
mac Add one further check with mac_policy_count to an mbuf copying case 2009-06-03 19:41:12 +00:00
mac_biba Continue work to optimize performance of "options MAC" when no MAC policy 2009-06-03 18:46:28 +00:00
mac_bsdextended Add hierarchical jails. A jail may further virtualize its environment 2009-05-27 14:11:23 +00:00
mac_ifoff Rather than having MAC policies explicitly declare what object types 2009-01-10 10:58:41 +00:00
mac_lomac Continue work to optimize performance of "options MAC" when no MAC policy 2009-06-03 18:46:28 +00:00
mac_mls Continue work to optimize performance of "options MAC" when no MAC policy 2009-06-03 18:46:28 +00:00
mac_none Rather than having MAC policies explicitly declare what object types 2009-01-10 10:58:41 +00:00
mac_partition Rather than having MAC policies explicitly declare what object types 2009-01-10 10:58:41 +00:00
mac_portacl - Correct logic in if statement - we want to allocate temporary buffer 2009-03-14 20:40:06 +00:00
mac_seeotheruids Rather than having MAC policies explicitly declare what object types 2009-01-10 10:58:41 +00:00
mac_stub Continue work to optimize performance of "options MAC" when no MAC policy 2009-06-03 18:46:28 +00:00
mac_test Continue work to optimize performance of "options MAC" when no MAC policy 2009-06-03 18:46:28 +00:00