Page MenuHomeFreeBSD

veriexec: Simplify the initialization of loader tunable
ClosedPublic

Authored by zlei on Oct 9 2023, 3:23 PM.
Tags
None
Referenced Files
F142899299: D42132.diff
Sat, Jan 24, 1:54 PM
Unknown Object (File)
Tue, Jan 6, 8:19 AM
Unknown Object (File)
Dec 8 2025, 11:06 AM
Unknown Object (File)
Dec 7 2025, 11:19 AM
Unknown Object (File)
Dec 4 2025, 9:15 AM
Unknown Object (File)
Nov 27 2025, 3:08 AM
Unknown Object (File)
Nov 21 2025, 3:06 AM
Unknown Object (File)
Nov 5 2025, 7:49 AM
Subscribers

Details

Summary

The loader tunable 'security.mac.veriexec.block_unlink' has already been
flagged with CTLFLAG_RDTUN, no need to re-fetch it with TUNABLE_INT_FETCH.

While here move the definition of sysctl knobs out of function body, which is more common in FreeBSD.

No functional change intended.

MFC after: 1 week

Test Plan

Set kernel env and load module. Verify the loader tunable is correctly set.

Escape to loader prompt:

load /boot/kernel/kernel
load /root/mac_veriexec.ko
set security.mac.veriexec.block_unlink=1
boot
# sysctl -T security.mac.veriexec.block_unlink
security.mac.veriexec.block_unlink: 1

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable