函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\rseq.c Create Date:2022-07-27 15:12:39
Last Modify:2022-05-20 08:09:32 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:rseq_get_rseq_cs

函数原型:static int rseq_get_rseq_cs(struct task_struct *t, struct rseq_cs *rseq_cs)

返回类型:int

参数:

类型参数名称
struct task_struct *t
struct rseq_cs *rseq_cs
117  __userurseq_cs
119  __userusig
123  如果copy_from_user( & ptr, & ptr64, ptr的长度)则返回:负EFAULT
125  如果非ptr
126  memset(rseq_cs, 0, rseq_cs的长度)
127  返回:0
129  如果ptr大于等于TASK_SIZE则返回:负EINVAL
131  urseq_cs等于ptr
132  如果copy_from_user(rseq_cs, urseq_cs, rseq_cs的长度)则返回:负EFAULT
135  如果start_ip大于等于TASK_SIZEstart_ipOffset from start_ip. 大于等于TASK_SIZEabort_ip大于等于TASK_SIZEVersion of this structure. 大于0则返回:负EINVAL
141  如果start_ipOffset from start_ip. 小于start_ip则返回:负EINVAL
144  如果abort_ipstart_ip小于Offset from start_ip. 则返回:负EINVAL
147  usig__user等于abort_ipsizeof(u32)
148  ret等于Careful: we have to cast the result to the type of the pointer* for sign reasons(sig, usig)
149  如果ret则返回:ret
152  如果rseq_sig不等于sig
153  atelimited messages with local ratelimit_state,* no local ratelimit_state used in the !PRINTK case(warning conditions "Possible attack attempt. Unexpected rseq signature 0x%x, expecting 0x%x (pid=%d, addr=%p).\n", sig, rseq_sig, pid, usig)
156  返回:负EINVAL
158  返回:0
调用者
名称描述
rseq_ip_fixup