函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\signal.c Create Date:2022-07-27 08:29:51
Last Modify:2022-05-22 06:23:02 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:restore_sigcontext

函数原型:static int restore_sigcontext(struct pt_regs *regs, struct sigcontext_64 __user *sc, unsigned long uc_flags)

返回类型:int

参数:

类型参数名称
struct pt_regs *regs
struct sigcontext_64 __user *sc
unsigned longuc_flags
102  __userbuf
104  err等于0
107  fn等于do_no_restart_syscall
109  {get|put}_user_try and catch* get_user_try {* get_user_ex(...);* } get_user_catch(err)
112  set_user_gs(regs, GET_SEG(取寄存器值(gs)))
113  COPY_SEG(取寄存器值(fs))
114  COPY_SEG(es)
115  COPY_SEG(取寄存器值(ds))
118  COPY(di)
118  COPY(si)
118  COPY(bp)
118  COPY(sp)
118  COPY(bx)
119  COPY(dx)
119  COPY(cx)
119  COPY(ip)
119  COPY(ax)
122  COPY(r8)
123  COPY(r9)
124  COPY(r10)
125  COPY(r11)
126  COPY(r12)
127  COPY(r13)
128  COPY(r14)
129  COPY(r15)
132  COPY_SEG_CPL3(cs)
133  COPY_SEG_CPL3(ss)
135  get_user_ex(tmpflags, & flags)
136  flags等于flags按位与FIX_EFLAGS的反按位或tmpflags按位与FIX_EFLAGS
137  orig_ax等于负1
139  get_user_ex(buf_val, & Zero when no FPU/extended context )
140  buf等于buf_val
141  get_user_catch(err)
148  如果此条件成立可能性小(为编译器优化)(!(uc_flags & UC_STRICT_RESTORE_SS) && user_64bit_mode(regs))则If regs->ss will cause an IRET fault, change it. Otherwise leave it* alone. Using this generally makes no sense unless* user_64bit_mode(regs) would return true.
152  err或等于Restore FPU state from a sigframe:
154  Force syscall return via IRET by making it look as if there was* some work pending()
156  返回:err
调用者
名称描述
sys_sigreturn
sys_rt_sigreturn