函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\syscall.c Create Date:2022-07-27 08:10:43
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:collect_syscall

函数原型:static int collect_syscall(struct task_struct *target, struct syscall_info *info)

返回类型:int

参数:

类型参数名称
struct task_struct *target
struct syscall_info *info
12  如果非try_get_task_stack(target)则
14  memset(info, 0, info的长度)
15  nr等于负1
16  返回:0
19  regs等于task_pt_regs(target)
20  如果此条件成立可能性小(为编译器优化)(!regs)则
21  put_task_stack(target)
22  返回:负EAGAIN
25  sp等于user_stack_pointer(regs)
26  instruction_pointer等于instruction_pointer(regs)
28  nr等于Only the low 32 bits of orig_ax are meaningful, so we return int.* This importantly ignores the high bits on 64-bit, so comparisons* sign-extend the low 32 bits.
29  如果nr不等于负1L则syscall_get_arguments(target, regs, (unsignedlong * ) & args[0])
33  put_task_stack(target)
34  返回:0
调用者
名称描述
task_current_syscallask_current_syscall - Discover what a blocked task is doing.*@target: thread to examine*@info: structure with the following fields:* .sp - filled with user stack pointer* .data.nr - filled with system call number or -1*