HomeFreeBSD

sysctl(9): add CTLFLAG_NEEDGIANT flag

Description

sysctl(9): add CTLFLAG_NEEDGIANT flag

Add CTLFLAG_NEEDGIANT flag (modelled after D_NEEDGIANT) that will be used to
mark sysctls that still require locking Giant.

Rewrite sysctl_handle_string() to use internal locking instead of locking
Giant.

Mark SYSCTL_STRING, SYSCTL_OPAQUE and their variants as MPSAFE.

Add infrastructure support for enforcing proper use of CTLFLAG_NEEDGIANT
and CTLFLAG_MPSAFE flags with SYSCTL_PROC and SYSCTL_NODE, not enabled yet.

Reviewed by: kib (mentor)
Approved by: kib (mentor)
Differential Revision: https://reviews.freebsd.org/D23378

Details

Provenance
kaktusAuthored on Feb 6 2020, 12:45 PM
Parents
rG28c0abcebb55: auditd_stop: wait_for_pids instead of sleeping
Branches
Unknown
Tags
Unknown