已关闭
DEC策略下发重构,单配置超限截断为前32条 #2135
soulrequiem创建于  8 天前关闭于  6 天前
soulrequiem
soulrequiem
8 天前 创建

问题描述

DEC策略下发存在以下问题:

  1. 单配置DEC路径数超KERNEL_BATCH_SIZE(8)时直接返回错误,导致应用启动失败
  2. SetDecPolicyInfos超限时destroy全部已累积策略,应保留已累积部分
  3. ioctl命令定义在头文件中,外部代码可直接调用ioctl绕过分批逻辑

修复方案

  1. IoctlDecPolicyBatch类型与DecPolicyInfo解耦,ioctl ABI固定path[8]
  2. ioctl命令定义移到sandbox_dec.c内部,防止外部直接调用
  3. 所有ioctl路径按KERNEL_BATCH_SIZE分批下发
  4. SetDecPolicyInfos超限时保留已累积,不再destroy全部
  5. 单配置DEC路径数超MAX_CONFIG_POLICY_NUM(32)时截断保留前32条
  6. MAX_POLICY_NUM从64调整为256,测试用例全部参数化无硬编码
likedislike
soulrequiemsoulrequiem
8 天前 关联了pull request:DEC策略下发重构,单配置超限截断为前32条
openharmony_ci
openharmony_ci成员
8 天前 评论:

感谢提交Issue!关于Issue的交互操作,请访问OpenHarmony社区支持命令清单。如果有问题,请联系 [@handyohos](https://gitcode.com/handyohos) [@mytide](https://gitcode.com/mytide) [@wangfenging](https://gitcode.com/wangfenging) 。如果需要调整订阅PR、Issue的变更状态,请访问链接


Thanks for submitting the issue. For more commands, please visit OpenHarmony Command List. If you have any questions, please refer to committer gitcode for help. If you need to change the subscription of a Pull Request or Issue, please visit the link.

likedislike
openharmony_ciopenharmony_ci成员
8 天前 添加了label:waiting_for_assign
openharmony_ciopenharmony_ci成员
6 天前 关闭了 issue
openharmony_ciopenharmony_ci成员
6 天前 issue状态由 待办的 改变为 已完成