HomeFreeBSD

hwpmc: On attach, ensure owner is a target effective GID's member

Description

hwpmc: On attach, ensure owner is a target effective GID's member

This restores a check that existed prior to commit be1f7435ef218b1d
("kern: start tracking cr_gid outside of cr_groups[]").

While here, improve pmc_can_attach()'s style by changing the type of
'decline_attach' to 'bool', fixing tests on it, adding missing
parentheses to 'return' statements, and by changing its return value
type to 'bool'.

Fixes: be1f7435ef218b1d ("kern: start tracking cr_gid outside of cr_groups[]")
MFC after: 9 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D52252

(cherry picked from commit 1c3c698ba4c40485ebbbd157cb49172cfa7de9b2)

Details

Provenance
olceAuthored on Aug 26 2025, 9:43 AM
Differential Revision
D52252: hwpmc: On attach, ensure owner is a target effective GID's member
Parents
rG960dbe036d85: ddb ps: Print again the effective GID, separately
Branches
Unknown
Tags
Unknown