Move capability checks into the LSM stack and remove Aster policy#1
Draft
zzj-5341 wants to merge 2 commits intolsm-aster-policyfrom
Draft
Move capability checks into the LSM stack and remove Aster policy#1zzj-5341 wants to merge 2 commits intolsm-aster-policyfrom
zzj-5341 wants to merge 2 commits intolsm-aster-policyfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This draft PR moves capability authorization into the built-in LSM stack and removes the temporary Aster inode/xattr policy module.
After this change, the active built-in LSM modules become:
capabilityas the major authorization moduleyamaas a minor ptrace restriction moduleThe main goal is to stop scattering capability checks across subsystems and instead route them through a unified LSM entry point, while preserving the existing Yama restriction model.
What this PR changes
Add a built-in
capabilityLSM moduleThis PR introduces a dedicated capability module under the LSM framework and routes capability authorization through the LSM stack.
Extend the LSM framework
This PR extends the framework with:
capablehook andCapableContextCapabilityReasonBprmCommittedCredsContextInodeDacOverrideContextMigrate existing capability checks
This PR routes several existing authorization paths through the LSM-backed capability interface, including:
capsetexecvecommitted-creds hook plumbingRemove the temporary Aster policy module
This PR removes the temporary Aster LSM policy implementation from the active security stack and deletes the associated Aster-specific regression tests.
Update security regression coverage
This PR updates the security test layout so the relevant regression coverage matches the new model:
Validation
Validated in:
/home/zzj/asterinas-cap-lsm-pr-cleancodex/lsm-capability-pr-cleanCommands used:
Result:
Scope of this draft
This draft intentionally focuses on:
It intentionally does not yet include the LSM design documents or boot-only regression helper files.
Follow-up work
CapabilityReasonmore deeply