Skip to content

Conversation

@wangrong1069
Copy link
Contributor

No description provided.

As title

Log: Update compiler flags for security enhancements
Bug: https://pms.uniontech.com/bug-view-337059.html
@github-actions
Copy link

TAG Bot

TAG: 6.5.13
EXISTED: no
DISTRIBUTION: unstable

As title.

Log: update version to 6.5.13
@deepin-ci-robot
Copy link

deepin pr auto review

我来对这个diff进行审查:

  1. 语法逻辑:
  • 代码语法正确,符合CMake的语法规范
  • 条件判断语句使用正确
  • 编译器标志设置符合预期
  1. 代码质量:
  • 变量命名清晰,使用标准的CMAKE变量
  • 代码结构清晰,有适当的条件判断
  • 保持了原有的代码风格
  1. 代码性能:
  • 主要是编译器标志的修改,不会影响运行时性能
  • 新增的标志(-Wl,-z,relro -Wl,-z,now)会在链接时增加一些安全检查,可能会略微增加链接时间,但影响很小
  1. 代码安全:
  • 新增的安全增强标志是很好的改进:
    • -Wl,-z,relro: 设置重定位只读,防止GOT/PLT表被修改
    • -Wl,-z,now: 立即绑定,防止lazy binding带来的安全风险
  • 这些标志可以有效防止一些常见的安全攻击,如GOT覆写攻击等
  • 保留了原有的PIE(Position Independent Executable)和PIC(Position Independent Code)设置

改进建议:

  1. 建议在changelog中更详细地说明具体添加了哪些安全标志,以及这些标志的作用
  2. 可以考虑在CMakeLists.txt中添加注释说明新增安全标志的目的
  3. 建议在代码仓库中添加相关文档,说明这些安全标志的作用和影响

总的来说,这是一个很好的安全增强更新,新增的编译器标志可以有效提高二进制文件的安全性,同时不会对程序的功能和性能产生明显影响。

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: lzwind, wangrong1069

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@wangrong1069
Copy link
Contributor Author

/merge

1 similar comment
@wangrong1069
Copy link
Contributor Author

/merge

@deepin-bot deepin-bot bot merged commit b64ca2c into linuxdeepin:master Nov 27, 2025
18 checks passed
@wangrong1069 wangrong1069 deleted the pr1127 branch November 27, 2025 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants