Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\signal.c Create Date:2022-07-28 07:30:35
Last Modify:2022-05-22 06:23:02 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:restore_sigcontext

Proto:static int restore_sigcontext(struct pt_regs *regs, struct sigcontext_64 __user *sc, unsigned long uc_flags)

Type:int

Parameter:

TypeParameterName
struct pt_regs *regs
struct sigcontext_64 __user *sc
unsigned longuc_flags
102  __user * buf
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(These functions are used to reference data in other segments. )
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  If Value for the false possibility is greater at compile time(!(uc_flags & UC_STRICT_RESTORE_SS) && user_64bit_mode(regs)) Then 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  Return err
Caller
NameDescribe
sys_sigreturn
sys_rt_sigreturn