Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\ptrace.c Create Date:2022-07-28 09:13:30
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:ptrace_peek_siginfo

Proto:static int ptrace_peek_siginfo(struct task_struct *child, unsigned long addr, unsigned long data)

Type:int

Parameter:

TypeParameterName
struct task_struct *child
unsigned longaddr
unsigned longdata
715  ret = copy_from_user( & arg, (void__user * )addr, sizeof(structptrace_peeksiginfo_args))
717  If ret Then Return -EFAULT
720  If flags & ~Read signals from a shared (process wide) queue Then Return -EINVAL
723  If how may siginfos to take < 0 Then Return -EINVAL
727  If from which siginfo to start > ULONG_MAX Then Return 0
730  If flags & Read signals from a shared (process wide) queue Then pending = shared_pending
732  Else pending = pending
735  When i < how may siginfos to take cycle
737  off = from which siginfo to start + i
738  bool found = false
740  spin_lock_irq( & siglock)
742  If Not off -- Then
743  found = true
744  copy_siginfo( & info, & info)
745  Break
748  spin_unlock_irq( & siglock)
750  If Not found Then Break
754  If Value for the false possibility is greater at compile time(in_compat_syscall()) Then
755  __user * uinfo = A pointer passed in from user mode. This should not* be used for syscall parameters, just declare them* as pointers because the syscall entry code will have* appropriately converted them already.
757  If copy_siginfo_to_user32(uinfo, & info) Then
758  ret = -EFAULT
759  Break
762  Else
765  __user * uinfo = data
767  If copy_siginfo_to_user(uinfo, & info) Then
768  ret = -EFAULT
769  Break
773  data += sizeof(siginfo_t)
774  i++
776  If signal_pending(current process) Then Break
779  cond_resched()
782  If i > 0 Then Return i
785  Return ret
Caller
NameDescribe
ptrace_request