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:42
Last Modify:2022-05-22 06:23:02 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:__setup_frame

Proto:static int __setup_frame(int sig, struct ksignal *ksig, sigset_t *set, struct pt_regs *regs)

Type:int

Parameter:

TypeParameterName
intsig
struct ksignal *ksig
sigset_t *set
struct pt_regs *regs
315  __user * frame
316  __user * restorer
317  err = 0
318  void __user * fpstate = NULL
320  frame = get_sigframe( & ka, regs, size of frame , & fpstate)
322  If Not access_ok - Checks if a user space pointer is valid*@addr: User space pointer to start of block to check*@size: Size of block to check* Context: User context only. This function may sleep if pagefaults are* enabled.(frame, size of frame ) Then Return -EFAULT
325  If Write a simple value into user space, with less checking(sig, & sig) Then Return -EFAULT
328  If setup_sigcontext( & sc, fpstate, regs, sig[0]) Then Return -EFAULT
331  If _NSIG_WORDS > 1 Then
332  If __copy_to_user( & extramask, & sig[1], size of extramask ) Then Return -EFAULT
337  If vdso Then restorer = vdso + sym___kernel_sigreturn
340  Else restorer = retcode
342  If sa_flags & SA_RESTORER Then restorer = sa_restorer
346  err |= Write a simple value into user space, with less checking(restorer, & pretcode)
355  err |= Write a simple value into user space, with less checking( * ((u64 * ) & retcode), (u64 * )retcode)
357  If err Then Return -EFAULT
361  sp = frame
362  ip = sa_handler
363  ax = sig
364  dx = 0
365  cx = 0
367  ds = __USER_DS
368  es = __USER_DS
369  ss = __USER_DS
370  cs = __USER_CS
372  Return 0