Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\exit.c Create Date:2022-07-28 09:03:54
Last Modify:2020-03-17 11:17:32 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:COMPAT_SYSCALL_DEFINE5

Proto:COMPAT_SYSCALL_DEFINE5(waitid, int, which, compat_pid_t, pid, struct compat_siginfo __user *, infop, int, options, struct compat_rusage __user *, uru)

Type:

Parameter:Nothing

1673  struct waitid_info info = {status = 0}
1674  err = kernel_waitid(which, pid, & info, options, uru ? & ru : NULL)
1675  signo = 0
1676  If err > 0 Then
1677  signo = SIGCHLD
1678  err = 0
1679  If uru Then
1681  If COMPAT_USE_64BIT_TIME Then err = copy_to_user(uru, & ru, size of ru )
1683  Else err = put_compat_rusage( & ru, uru)
1685  If err Then Return -EFAULT
1690  If Not infop Then Return err
1693  If Not The "unsafe" user accesses aren't really "unsafe", but the naming* is a big fat warning: you have to not only do the access_ok()* checking before using them, but you have to surround them with the* user_access_begin/end() pair. Then Return -EFAULT
1696  unsafe_put_user(signo, & si_signo, Efault)
1697  unsafe_put_user(0, & si_errno, Efault)
1698  unsafe_put_user(cause, & si_code, Efault)
1699  unsafe_put_user(pid, & si_pid, Efault)
1700  unsafe_put_user(uid, & si_uid, Efault)
1701  unsafe_put_user(status, & si_status, Efault)
1702  user_access_end()
1703  Return err
1704  Efault :
1705  user_access_end()
1706  Return -EFAULT