Function report |
Source Code:kernel\livepatch\transition.c |
Create Date:2022-07-28 10:31:57 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Determine whether it's safe to transition the task to the target patch state* by looking for any to-be-patched or to-be-unpatched functions on its stack.
Proto:static int klp_check_stack(struct task_struct *task, char *err_buf)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct task_struct * | task | |
| char * | err_buf |
| 249 | ret = stack_trace_save_tsk_reliable(task, entries, ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized(entries)) |
| 250 | If ret < 0 Then |
| 254 | Return ret |
| 256 | nr_entries = ret |
| 259 | If Not patched Then Continue |
| 261 | klp_for_each_func(obj, func) |
| 273 | Return 0 |
| Name | Describe |
|---|---|
| klp_try_switch_task | Try to safely switch a task to the target patch state. If it's currently* running, or it's sleeping on a to-be-patched or to-be-unpatched function, or* if the stack is unreliable, return false. |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |