Function report |
Source Code:kernel\ptrace.c |
Create Date:2022-07-28 09:13:38 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:ptrace_request
Proto:int ptrace_request(struct task_struct *child, long request, unsigned long addr, unsigned long data)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct task_struct * | child | |
long | request | |
unsigned long | addr | |
unsigned long | data |
1005 | seized = ptrace & SEIZE used, enable new behavior |
1013 | Case request == PTRACE_PEEKTEXT |
1014 | Case request == PTRACE_PEEKDATA |
1015 | Return generic_ptrace_peekdata(child, addr, data) |
1016 | Case request == PTRACE_POKETEXT |
1017 | Case request == PTRACE_POKEDATA |
1018 | Return generic_ptrace_pokedata(child, addr, data) |
1021 | Case request == PTRACE_OLDSETOPTIONS |
1024 | ret = ptrace_setoptions(child, data) |
1025 | Break |
1026 | Case request == PTRACE_GETEVENTMSG |
1028 | Break |
1030 | Case request == PTRACE_PEEKSIGINFO |
1031 | ret = ptrace_peek_siginfo(child, addr, data) |
1032 | Break |
1034 | Case request == PTRACE_GETSIGINFO |
1035 | ret = ptrace_getsiginfo(child, & siginfo) |
1036 | If Not ret Then ret = copy_siginfo_to_user(datavp, & siginfo) |
1038 | Break |
1040 | Case request == PTRACE_SETSIGINFO |
1041 | ret = copy_siginfo_from_user( & siginfo, datavp) |
1042 | If Not ret Then ret = ptrace_setsiginfo(child, & siginfo) |
1044 | Break |
1046 | Case request == PTRACE_GETSIGMASK |
1054 | If test_tsk_restore_sigmask(child) Then mask = Restored if set_restore_sigmask() was used: |
1061 | Else ret = 0 |
1064 | Break |
1067 | Case request == PTRACE_SETSIGMASK |
1075 | If copy_from_user( & new_set, datavp, sizeof(sigset_t)) Then |
1087 | spin_lock_irq( & siglock) |
1089 | spin_unlock_irq( & siglock) |
1093 | ret = 0 |
1094 | Break |
1097 | Case request == PTRACE_INTERRUPT |
1108 | If Value for the false possibility is greater at compile time(!seized || !lock_task_sighand(child, & flags)) Then Break |
1117 | If Value is more likely to compile time(task_set_jobctl_pending(child, JOBCTL_TRAP_STOP)) Then ptrace_signal_wake_up(child, siglock protected & JOBCTL_LISTENING) |
1120 | unlock_task_sighand(child, & flags) |
1121 | ret = 0 |
1122 | Break |
1124 | Case request == PTRACE_LISTEN |
1133 | If Value for the false possibility is greater at compile time(!seized || !lock_task_sighand(child, & flags)) Then Break |
1136 | si = last_siginfo |
1137 | If Value is more likely to compile time(si && (si_code >> 8) == Extended result codes which enabled by means other than options. ) Then |
1138 | siglock protected |= JOBCTL_LISTENING |
1143 | If siglock protected & JOBCTL_TRAP_NOTIFY Then ptrace_signal_wake_up(child, true) |
1145 | ret = 0 |
1147 | unlock_task_sighand(child, & flags) |
1148 | Break |
1150 | Case request == PTRACE_DETACH |
1151 | ret = ptrace_detach(child, data) |
1152 | Break |
1181 | Case request == PTRACE_SINGLESTEP |
1184 | Case request == sume execution until next branch |
1187 | Case request == PTRACE_SYSEMU |
1188 | Case request == PTRACE_SYSEMU_SINGLESTEP |
1190 | Case request == PTRACE_SYSCALL |
1191 | Case request == PTRACE_CONT |
1192 | Return ptrace_resume(child, request, data) |
1194 | Case request == PTRACE_KILL |
1195 | If exit state Then Return 0 |
1197 | Return ptrace_resume(child, request, SIGKILL) |
1223 | Case request == PTRACE_SECCOMP_GET_FILTER |
1224 | ret = seccomp_get_filter(child, addr, datavp) |
1225 | Break |
1227 | Case request == PTRACE_SECCOMP_GET_METADATA |
1228 | ret = seccomp_get_metadata(child, addr, datavp) |
1229 | Break |
1231 | Default |
1232 | Break |
1235 | Return ret |
Name | Describe |
---|---|
compat_ptrace_request |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |