Page MenuHomeFreeBSD

mac: kdb/ddb framework hooks
ClosedPublic

Authored by mhorne on May 31 2022, 6:07 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Mar 9, 11:48 AM
Unknown Object (File)
Mon, Mar 9, 6:00 AM
Unknown Object (File)
Sun, Mar 8, 11:44 PM
Unknown Object (File)
Sat, Mar 7, 4:29 PM
Unknown Object (File)
Fri, Mar 6, 11:16 PM
Unknown Object (File)
Tue, Feb 24, 8:34 PM
Unknown Object (File)
Jan 26 2026, 4:54 PM
Unknown Object (File)
Jan 17 2026, 11:09 PM

Details

Summary

Add three simple hooks to the debugger allowing for a loaded MAC policy
to intervene if desired:

  1. Before invoking the kdb backend
  2. Before ddb command registration
  3. Before ddb command execution

We extend struct db_command with a private pointer and two flag bits
reserved for policy use.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 45795
Build 42683: arc lint + arc unit

Event Timeline

markj added inline comments.
sys/ddb/db_command.c
481

This line appears to be too long.

sys/security/mac/mac_debugger.c
1

mac_kdb.c might be a better name for this file. "debugger" sounds too generic to me.

This revision is now accepted and ready to land.Jul 13 2022, 2:30 PM
This revision was automatically updated to reflect the committed changes.