Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\rseq.c Create Date:2022-07-28 13:50:46
Last Modify:2022-05-20 08:09:32 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:rseq_get_rseq_cs

Proto:static int rseq_get_rseq_cs(struct task_struct *t, struct rseq_cs *rseq_cs)

Type:int

Parameter:

TypeParameterName
struct task_struct *t
struct rseq_cs *rseq_cs
117  __user * urseq_cs
119  __user * usig
123  If copy_from_user( & ptr, & ptr64, size of ptr ) Then Return -EFAULT
125  If Not ptr Then
126  memset(rseq_cs, 0, size of rseq_cs )
127  Return 0
129  If ptr >= TASK_SIZE Then Return -EINVAL
131  urseq_cs = ptr
132  If copy_from_user(rseq_cs, urseq_cs, size of rseq_cs ) Then Return -EFAULT
135  If start_ip >= TASK_SIZE || start_ip + Offset from start_ip. >= TASK_SIZE || abort_ip >= TASK_SIZE || Version of this structure. > 0 Then Return -EINVAL
141  If start_ip + Offset from start_ip. < start_ip Then Return -EINVAL
144  If abort_ip - start_ip < Offset from start_ip. Then Return -EINVAL
147  usig * __user = abort_ip - sizeof(u32)
148  ret = Get a simple variable from user space(sig, usig)
149  If ret Then Return ret
152  If rseq_sig != sig Then
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  Return -EINVAL
158  Return 0
Caller
NameDescribe
rseq_ip_fixup