HomeFreeBSD

mac: implement fast path for checks

Description

mac: implement fast path for checks

All checking routines walk a linked list of all modules in order to determine
if given hook is installed. This became a significant problem after mac_ntpd
started being loaded by default.

Implement a way perform checks for select hooks by testing a boolean.

Use it for priv_check and priv_grant, which are constantly called from priv_check.

The real fix would use hotpatching, but the above provides a way to know when
to do it.

Details

Provenance
mjgAuthored on
Parents
rS357886: Inline jailed().
Branches
Unknown
Tags
Unknown