lua-lsm: expose shared dictionaries through securityfs - #2
Merged
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.
改动概述
LIVE状态的模块/sys/kernel/security/lua/shdict,支持用户态按类型执行get和settools/testing/selftests/lua_lsm测试,并登记到 kselftest 顶层目标本 PoC 已跑通完整链路:
加载 Lua 策略 → Hook 创建共享字典 → 用户态通过 securityfs 读写 → Lua Hook 立即读取新值并改变访问结果整个过程不需要重新加载模块。
验证结果
git diff --check:通过checkpatch.pl:0 errors测试覆盖以下场景:
LIVE模块访问返回-ESHUTDOWN当前范围
该接口目前明确作为 PoC/不稳定接口,不视为正式 ABI。本次改动暂不包含:
上游 PR openanolis#16 所处理的 Lua 侧卸载生命周期问题仍保持在本次改动范围之外。