fix(vfs): adapt vfs probes for Linux 6.15+#221
Conversation
Refactor DECL_VFS_KRP to support ptr return type for vfs_mkdir in kernels >= 6.15. Replace IS_ERR_VALUE with IS_ERR for pointer return value checking. Add proper version branches for kernel 6.15+ and 6.19+. 修复Linux 6.15+内核版本的VFS API兼容性问题,重构DECL_VFS_KRP 宏以支持vfs_mkdir的ptr返回类型检查,并添加相应内核版本分支。 Log: 修复Linux 6.15+ VFS兼容性问题 PMS: TASK-390673 Influence: 修复后在Linux 6.15及以上内核版本上正确监控文件系统操作。
As title. Log: Bump version to 7.0.43
There was a problem hiding this comment.
Sorry @wangrong1069, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
|
TAG Bot TAG: 7.0.43 |
deepin pr auto review你好!我是CodeGeeX。我已仔细审查了你提供的Git Diff。本次修改主要是为了适配 Linux 内核 6.15+ 及 7.0+ 版本的 VFS 探针(kretprobes)变更,重构了宏定义以减少重复代码,并修正了指针返回值的错误检查方式。 总体而言,修改思路清晰,代码复用性得到了提升。但在代码安全、逻辑准确性和代码规范方面,我有以下几点改进建议: 1. 代码安全与逻辑准确性严重问题:
2. 代码性能
static int common_vfs_ret_int_(struct vfs_event **event, struct pt_regs *regs, int action)
{
if (regs_return_value(regs))
goto fail;
// ...
3. 语法逻辑与健壮性宏定义中的标识符命名冲突风险 #define DECL_VFS_KRP_EXT(fn, act, de_i, ret) ...
return common_vfs_ret_##ret##_((struct vfs_event **)&(ri->data), regs, act);\
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 12, 0)
// ...
#elif LINUX_VERSION_CODE < KERNEL_VERSION(6, 15, 0)
// ...
#elif LINUX_VERSION_CODE < KERNEL_VERSION(6, 19, 0)
// ...
#else
// ...
#endif
4. 代码规范与质量版权声明的年份跳跃 -// Copyright (C) 2021 UOS Technology Co., Ltd.
-// SPDX-FileCopyrightText: 2022 - 2023 UnionTech Software Technology Co., Ltd.
+// SPDX-FileCopyrightText: 2022 - 2026 UnionTech Software Technology Co., Ltd.
宏定义的代码可读性
总结最核心的修改点是 |
|
CI 的 liblucene++ 版本未更新,忽略编译失败 |
|
[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. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/forcemerge |
|
This pr force merged! (status: unstable) |
62c6303
into
linuxdeepin:develop/snipe
|
TAG Bot ✅ Tag created successfully 📋 Tag Details
|
No description provided.