[PATCH 3/4] apparmor: write the feature set to a file at build time

sashiko-bot at kernel.org sashiko-bot at kernel.org
Tue Nov 17 14:00:55 UTC 2026


> apparmor_parser compiles policy for the feature set of the kernel,
> which libapparmor reads from /sys/kernel/security/apparmor/features,
> and the policy cache is keyed on that set. The cache for a kernel can
> therefore only be filled once that kernel runs, and the first boot
> into a kernel with a new feature set compiles all of the policy.
> 
> Every entry of the features directory comes from a static table of
> constants. So write the set to security/apparmor/features when the
> kernel is built, in the format that libapparmor flattens the directory
> to. Policy can then be compiled when a kernel is installed:
> 
>   apparmor_parser --kernel-features=<file> ...
> 
> Signed-off-by: Maxime Bélair <maxime.belair at canonical.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261117135042.78238-1-maxime.belair@canonical.com?part=3




More information about the Linux-security-module-archive mailing list