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
Reviewer
kib
Differential Revision
D23378: sysctl(9): add CTLFLAG_NEEDGIANT flag
Parents
rS357613: Bump FreeBSD version due to recent LinuxKPI changes.
Branches
Unknown
Tags
Unknown