登录
注册
开源
企业版
高校版
搜索
帮助中心
使用条款
关于我们
开源
企业版
高校版
私有云
模力方舟
AI 队友
登录
注册
轻量养虾,开箱即用!低 Token + 稳定算力,Gitee & 模力方舟联合出品的 PocketClaw 正式开售!点击了解详情
代码拉取完成,页面将自动刷新
仓库状态说明
开源项目
>
其他开源
>
操作系统
&&
捐赠
捐赠前请先登录
取消
前往登录
扫描微信二维码支付
取消
支付完成
支付提示
将跳转至支付宝完成支付
确定
取消
Watch
不关注
关注所有动态
仅关注版本发行动态
关注但不提醒动态
128
Star
73
Fork
330
src-openEuler
/
kernel
关闭
代码
Issues
1197
Pull Requests
35
Wiki
统计
流水线
服务
JavaDoc
PHPDoc
质量分析
Jenkins for Gitee
腾讯云托管
腾讯云 Serverless
悬镜安全
阿里云 SAE
Codeblitz
SBOM
开发画像分析
我知道了,不再自动展开
更新失败,请稍后重试!
移除标识
内容风险标识
本任务被
标识为内容中包含有代码安全 Bug 、隐私泄露等敏感信息,仓库外成员不可访问
[Syzkaller] BUG: soft lockup in rtc_timer_do_work
已完成
#IBV6W4
任务
wangxiongfeng
成员
创建于
2025-03-21 11:36
watchdog: BUG: soft lockup - CPU#0 stuck for 23s! [kworker/0:0:11437] Modules linked in: CPU: 0 PID: 11437 Comm: kworker/0:0 Not tainted 5.10.0+ #2 Hardware name: linux,dummy-virt (DT) Workqueue: events rtc_timer_do_work pstate: 60000005 (nZCv daif -PAN -UAO -TCO BTYPE=--) pc : __asan_store8+0x74/0xc0 mm/kasan/generic.c:253 lr : rb_link_node include/linux/rbtree.h:72 [inline] lr : timerqueue_add+0x11c/0x160 lib/timerqueue.c:47 sp : ffffff80c0de7a80 x29: ffffff80c0de7a80 x28: ffffff80c129c500 x27: ffffffd012218000 x26: ffffff80d74cae10 x25: ffffff80c129c580 x24: ffffff80c129c4f8 x23: ffffff80c129c560 x22: ffffffd012bdfb48 x21: ffffff80c129c548 x20: 000000003b9aca00 x19: 0000000000000000 x18: 0000000000000000 x17: 0000000000000000 x16: 0000000000000000 x15: 0000007fe83d67d8 x14: 0000000000000000 x13: 0000000000000000 x12: ffffffc01825389b x11: 1ffffff01825389a x10: ffffffc01825389a x9 : ffffffd01126f56c x8 : ffffff80c129c4d0 x7 : 0000000000000001 x6 : ffffffc01825389a x5 : ffffff80c129c4d0 x4 : dfffffd000000000 x3 : ffffffd010c79ecc x2 : 0000000000000007 x1 : 0000000000000000 x0 : ffffff80c129c548 Call trace: memory_is_poisoned_1 mm/kasan/generic.c:54 [inline] memory_is_poisoned_2_4_8 mm/kasan/generic.c:74 [inline] memory_is_poisoned mm/kasan/generic.c:158 [inline] check_memory_region_inline mm/kasan/generic.c:184 [inline] __asan_store8+0x74/0xc0 mm/kasan/generic.c:253 rb_link_node include/linux/rbtree.h:72 [inline] timerqueue_add+0x11c/0x160 lib/timerqueue.c:47 rtc_timer_do_work+0x3c0/0x5d4 drivers/rtc/interface.c:932 process_one_work+0x3ec/0x930 kernel/workqueue.c:2270 worker_thread+0x108/0x7dc kernel/workqueue.c:2416 kthread+0x1a0/0x1ec kernel/kthread.c:313 ret_from_fork+0x10/0x18 arch/arm64/kernel/entry.S:914 在syz log看到如下日志。 ioctlRTCUIEON(r0,0x7003)(async)ioctl RTC_SET_TIME(r0, 0x4024700a, &(0x7f0000000100)={0x0, 0x0, 0x0, 0x3, 0x1, 0x7f, 0x100}) RTC_UIE_ON会创建一个uie_rtctimer定时器,到期时间是1s,同时周期也是1s。rtc_timer_do_work会执行所有到期定时器的回调函数,并且将周期定时器重新添加到timer队列中。 void rtc_timer_do_work(struct work_struct *work) { while ((next = timerqueue_getnext(&rtc->timerqueue))) { if (next->expires > now) break; /* expire timer */ timer = container_of(next, struct rtc_timer, node); timerqueue_del(&rtc->timerqueue, &timer->node); trace_rtc_timer_dequeue(timer); timer->enabled = 0; if (timer->func) timer->func(timer->rtc); trace_rtc_timer_fired(timer); /* Re-add/fwd periodic timers */ if (ktime_to_ns(timer->period)) { timer->node.expires = ktime_add(timer->node.expires, timer->period); timer->enabled = 1; timerqueue_add(&rtc->timerqueue, &timer->node); trace_rtc_timer_enqueue(timer); } } ... } RTC_SET_TIME又将时间设置为距离现在很遥远的时间,导致uie_rtctimer不断处于 到期-重新入队 的循环,直到定时器的到期时间比rtc时间更晚,这一过程导致watchdog无法得到调度,最终触发softlockup。
watchdog: BUG: soft lockup - CPU#0 stuck for 23s! [kworker/0:0:11437] Modules linked in: CPU: 0 PID: 11437 Comm: kworker/0:0 Not tainted 5.10.0+ #2 Hardware name: linux,dummy-virt (DT) Workqueue: events rtc_timer_do_work pstate: 60000005 (nZCv daif -PAN -UAO -TCO BTYPE=--) pc : __asan_store8+0x74/0xc0 mm/kasan/generic.c:253 lr : rb_link_node include/linux/rbtree.h:72 [inline] lr : timerqueue_add+0x11c/0x160 lib/timerqueue.c:47 sp : ffffff80c0de7a80 x29: ffffff80c0de7a80 x28: ffffff80c129c500 x27: ffffffd012218000 x26: ffffff80d74cae10 x25: ffffff80c129c580 x24: ffffff80c129c4f8 x23: ffffff80c129c560 x22: ffffffd012bdfb48 x21: ffffff80c129c548 x20: 000000003b9aca00 x19: 0000000000000000 x18: 0000000000000000 x17: 0000000000000000 x16: 0000000000000000 x15: 0000007fe83d67d8 x14: 0000000000000000 x13: 0000000000000000 x12: ffffffc01825389b x11: 1ffffff01825389a x10: ffffffc01825389a x9 : ffffffd01126f56c x8 : ffffff80c129c4d0 x7 : 0000000000000001 x6 : ffffffc01825389a x5 : ffffff80c129c4d0 x4 : dfffffd000000000 x3 : ffffffd010c79ecc x2 : 0000000000000007 x1 : 0000000000000000 x0 : ffffff80c129c548 Call trace: memory_is_poisoned_1 mm/kasan/generic.c:54 [inline] memory_is_poisoned_2_4_8 mm/kasan/generic.c:74 [inline] memory_is_poisoned mm/kasan/generic.c:158 [inline] check_memory_region_inline mm/kasan/generic.c:184 [inline] __asan_store8+0x74/0xc0 mm/kasan/generic.c:253 rb_link_node include/linux/rbtree.h:72 [inline] timerqueue_add+0x11c/0x160 lib/timerqueue.c:47 rtc_timer_do_work+0x3c0/0x5d4 drivers/rtc/interface.c:932 process_one_work+0x3ec/0x930 kernel/workqueue.c:2270 worker_thread+0x108/0x7dc kernel/workqueue.c:2416 kthread+0x1a0/0x1ec kernel/kthread.c:313 ret_from_fork+0x10/0x18 arch/arm64/kernel/entry.S:914 在syz log看到如下日志。 ioctlRTCUIEON(r0,0x7003)(async)ioctl RTC_SET_TIME(r0, 0x4024700a, &(0x7f0000000100)={0x0, 0x0, 0x0, 0x3, 0x1, 0x7f, 0x100}) RTC_UIE_ON会创建一个uie_rtctimer定时器,到期时间是1s,同时周期也是1s。rtc_timer_do_work会执行所有到期定时器的回调函数,并且将周期定时器重新添加到timer队列中。 void rtc_timer_do_work(struct work_struct *work) { while ((next = timerqueue_getnext(&rtc->timerqueue))) { if (next->expires > now) break; /* expire timer */ timer = container_of(next, struct rtc_timer, node); timerqueue_del(&rtc->timerqueue, &timer->node); trace_rtc_timer_dequeue(timer); timer->enabled = 0; if (timer->func) timer->func(timer->rtc); trace_rtc_timer_fired(timer); /* Re-add/fwd periodic timers */ if (ktime_to_ns(timer->period)) { timer->node.expires = ktime_add(timer->node.expires, timer->period); timer->enabled = 1; timerqueue_add(&rtc->timerqueue, &timer->node); trace_rtc_timer_enqueue(timer); } } ... } RTC_SET_TIME又将时间设置为距离现在很遥远的时间,导致uie_rtctimer不断处于 到期-重新入队 的循环,直到定时器的到期时间比rtc时间更晚,这一过程导致watchdog无法得到调度,最终触发softlockup。
评论 (
2
)
登录
后才可以发表评论
状态
已完成
待办的
进行中
已完成
已拒绝
负责人
未设置
标签
sig/Kernel
未设置
项目
未立项任务
未立项任务
里程碑
未关联里程碑
未关联里程碑
Pull Requests
未关联
未关联
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
未关联
分支 (
-
)
标签 (
-
)
开始日期   -   截止日期
-
置顶选项
不置顶
置顶等级:高
置顶等级:中
置顶等级:低
优先级
不指定
严重
主要
次要
不重要
预计工期
(小时)
参与者(2)
1
https://gitee.com/src-openeuler/kernel.git
git@gitee.com:src-openeuler/kernel.git
src-openeuler
kernel
kernel
点此查找更多帮助
搜索帮助
Git 命令在线学习
如何在 Gitee 导入 GitHub 仓库
Git 仓库基础操作
企业版和社区版功能对比
SSH 公钥设置
如何处理代码冲突
仓库体积过大,如何减小?
如何找回被删除的仓库数据
Gitee 产品配额说明
GitHub仓库快速导入Gitee及同步更新
什么是 Release(发行版)
将 PHP 项目自动发布到 packagist.org
评论
仓库举报
回到顶部
登录提示
该操作需登录 Gitee 帐号,请先登录后再操作。
立即登录
没有帐号,去注册