Sign in
Sign up
Explore
Enterprise
Education
Search
Help
Terms of use
About Us
Explore
Enterprise
Education
Gitee Premium
Gitee AI
AI teammates
Sign in
Sign up
Fetch the repository succeeded.
description of repo status
Open Source
>
Other
>
Operation System
&&
Donate
Please sign in before you donate.
Cancel
Sign in
Scan WeChat QR to Pay
Cancel
Complete
Prompt
Switch to Alipay.
OK
Cancel
Watch
Unwatch
Watching
Releases Only
Ignoring
458
Star
1.7K
Fork
1.9K
GVP
openEuler
/
kernel
Closed
Code
Issues
1271
Pull Requests
991
Wiki
Insights
Pipelines
Service
Quality Analysis
Jenkins for Gitee
Tencent CloudBase
Tencent Cloud Serverless
悬镜安全
Aliyun SAE
Codeblitz
SBOM
DevLens
Don’t show this again
Update failed. Please try again later!
Remove this flag
Content Risk Flag
This task is identified by
as the content contains sensitive information such as code security bugs, privacy leaks, etc., so it is only accessible to contributors of this repository.
【OLK-5.10】xfs: read only mounts with fsopen mount API are busted
Done
#IC95MC
内核缺陷
Zizhi Wo
Opened this issue
2025-05-20 16:21
使用新的mount api可能会导致xfs文件系统不能及时识别一些flag,使得挂载产生非预期的失败。 比如: fsconfig(fs_fd, FSCONFIG_SET_FLAG, "ro", NULL, 0) fsconfig(fs_fd, FSCONFIG_SET_FLAG, "norecovery", NULL, 0) 使用fsconfig指定ro和norecovery挂载xfs,就会报错。xfs_fc_fill_super->xfs_fc_validate_params会检查,如果指定了norecovery,xfs必须是只读的。但是我们对于xfs的只读flag,原先是在xfs_init_fs_context中拷贝的vfs,但是新的mount api早在fsopen期间就调用了xfs_init_fs_context,fsconfig不会再调用了,也就是一直没有机会设置上XFS_OPSTATE_READONLY,导致了后续的报错: [root@fedora ctest]# ./new_mount fsconfig: create: Invalid argument [root@fedora ~]# [19814.614464] XFS (vdd): no-recovery mounts must be read-only. 通过将拷贝flag的操作移动到xfs_fc_fill_super流程中来解决此问题。 **二、缺陷分析结构反馈** 影响性分析说明: 缺陷严重等级:(Critical/High/Moderate/Low) 缺陷根因说明: 受影响版本排查(受影响/不受影响): openEuler-20.03-LTS-SP4 openEuler-22.03-LTS-SP3 openEuler-22.03-LTS-SP4 openEuler-24.03-LTS openEuler-24.03-LTS-SP1 修复是否涉及abi变化(是/否): openEuler-20.03-LTS-SP4 openEuler-22.03-LTS-SP3 openEuler-22.03-LTS-SP4 openEuler-24.03-LTS openEuler-24.03-LTS-SP1
使用新的mount api可能会导致xfs文件系统不能及时识别一些flag,使得挂载产生非预期的失败。 比如: fsconfig(fs_fd, FSCONFIG_SET_FLAG, "ro", NULL, 0) fsconfig(fs_fd, FSCONFIG_SET_FLAG, "norecovery", NULL, 0) 使用fsconfig指定ro和norecovery挂载xfs,就会报错。xfs_fc_fill_super->xfs_fc_validate_params会检查,如果指定了norecovery,xfs必须是只读的。但是我们对于xfs的只读flag,原先是在xfs_init_fs_context中拷贝的vfs,但是新的mount api早在fsopen期间就调用了xfs_init_fs_context,fsconfig不会再调用了,也就是一直没有机会设置上XFS_OPSTATE_READONLY,导致了后续的报错: [root@fedora ctest]# ./new_mount fsconfig: create: Invalid argument [root@fedora ~]# [19814.614464] XFS (vdd): no-recovery mounts must be read-only. 通过将拷贝flag的操作移动到xfs_fc_fill_super流程中来解决此问题。 **二、缺陷分析结构反馈** 影响性分析说明: 缺陷严重等级:(Critical/High/Moderate/Low) 缺陷根因说明: 受影响版本排查(受影响/不受影响): openEuler-20.03-LTS-SP4 openEuler-22.03-LTS-SP3 openEuler-22.03-LTS-SP4 openEuler-24.03-LTS openEuler-24.03-LTS-SP1 修复是否涉及abi变化(是/否): openEuler-20.03-LTS-SP4 openEuler-22.03-LTS-SP3 openEuler-22.03-LTS-SP4 openEuler-24.03-LTS openEuler-24.03-LTS-SP1
Comments (
3
)
Sign in
to comment
Status
Done
Backlog
已挂起
Doing
Declined
Done
Assignees
Not set
CTC-Xibo.Wang
CTC-XiboWang
Assignee
Collaborator
+Assign
+Mention
Labels
sig/Kernel
Not set
Projects
Unprojected
Unprojected
Milestones
No related milestones
No related milestones
Pull Requests
None yet
None yet
Successfully merging a pull request will close this issue.
Branches
No related branch
Branches (
-
)
Tags (
-
)
Planed to start   -   Planed to end
-
Top level
Not Top
Top Level: High
Top Level: Medium
Top Level: Low
Priority
Not specified
Serious
Main
Secondary
Unimportant
Duration
(hours)
参与者(2)
C
1
https://gitee.com/openeuler/kernel.git
git@gitee.com:openeuler/kernel.git
openeuler
kernel
kernel
Going to Help Center
Search
Git 命令在线学习
如何在 Gitee 导入 GitHub 仓库
Git 仓库基础操作
企业版和社区版功能对比
SSH 公钥设置
如何处理代码冲突
仓库体积过大,如何减小?
如何找回被删除的仓库数据
Gitee 产品配额说明
GitHub仓库快速导入Gitee及同步更新
什么是 Release(发行版)
将 PHP 项目自动发布到 packagist.org
Comment
Repository Report
Back to the top
Login prompt
This operation requires login to the code cloud account. Please log in before operating.
Go to login
No account. Register