函数逻辑报告 |
Source Code:kernel\livepatch\transition.c |
Create Date:2022-07-27 11:31:53 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:Try to switch all remaining tasks to the target patch state by walking the* stacks of sleeping tasks and looking for any to-be-patched or* to-be-unpatched functions. If such functions are found, the task can't be* switched yet.
函数原型:void klp_try_complete_transition(void)
返回类型:void
参数:无
| 393 | bool complete = true |
| 395 | WARN_ON_ONCE(klp_target_state == ask patch states ) |
| 406 | read_lock( & tasklist_lock) |
| 410 | read_unlock( & tasklist_lock) |
| 415 | get_online_cpus() |
| 417 | task等于dle_task - return the idle task for a given CPU.*@cpu: the processor in question.* Return: The idle task for the CPU @cpu. |
| 418 | 如果cpu_online(cpu)则 |
| 421 | 否则如果patch_state不等于klp_target_state则 |
| 423 | 清除线程指定标志 |
| 427 | put_online_cpus() |
| 429 | 如果非complete则 |
| 430 | 如果klp_signals_cnt且非klp_signals_cnt与SIGNALS_TIMEOUT的模则Sends a fake signal to all non-kthread tasks with TIF_PATCH_PENDING set.* Kthreads with TIF_PATCH_PENDING set are woken up. |
| 432 | klp_signals_cnt自加 |
| 439 | 在延迟工作队列中放置任务 |
| 441 | 返回 |
| 453 | 如果非enabled则klp_free_patch_async(patch) |
| 455 | 否则如果replace则klp_free_replaced_patches_async(patch) |
| 名称 | 描述 |
|---|---|
| __klp_enable_patch | |
| klp_transition_work_fn | This work can be performed periodically to finish patching or unpatching any* "straggler" tasks which failed to transition in the first attempt. |
| __klp_disable_patch | Sysfs Interface* /sys/kernel/livepatch* /sys/kernel/livepatch/ |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |