ptrace.c (cf9ce948f47640797bd19980e1d99c6d17d0bdc3) ptrace.c (91397401bb5072f71e8ce8744ad0bdec3e875a91)
1/*
2 * OpenRISC ptrace.c
3 *
4 * Linux architectural port borrowing liberally from similar works of
5 * others. All original copyrights apply as per the original source
6 * declaration.
7 *
8 * Modifications for the OpenRISC architecture:

--- 173 unchanged lines hidden (view full) ---

182 tracehook_report_syscall_entry(regs))
183 /*
184 * Tracing decided this syscall should not happen.
185 * We'll return a bogus call number to get an ENOSYS
186 * error, but leave the original number in <something>.
187 */
188 ret = -1L;
189
1/*
2 * OpenRISC ptrace.c
3 *
4 * Linux architectural port borrowing liberally from similar works of
5 * others. All original copyrights apply as per the original source
6 * declaration.
7 *
8 * Modifications for the OpenRISC architecture:

--- 173 unchanged lines hidden (view full) ---

182 tracehook_report_syscall_entry(regs))
183 /*
184 * Tracing decided this syscall should not happen.
185 * We'll return a bogus call number to get an ENOSYS
186 * error, but leave the original number in <something>.
187 */
188 ret = -1L;
189
190 audit_syscall_entry(AUDIT_ARCH_OPENRISC, regs->gpr[11],
191 regs->gpr[3], regs->gpr[4],
190 audit_syscall_entry(regs->gpr[11], regs->gpr[3], regs->gpr[4],
192 regs->gpr[5], regs->gpr[6]);
193
194 return ret ? : regs->gpr[11];
195}
196
197asmlinkage void do_syscall_trace_leave(struct pt_regs *regs)
198{
199 int step;
200
201 audit_syscall_exit(regs);
202
203 step = test_thread_flag(TIF_SINGLESTEP);
204 if (step || test_thread_flag(TIF_SYSCALL_TRACE))
205 tracehook_report_syscall_exit(regs, step);
206}
191 regs->gpr[5], regs->gpr[6]);
192
193 return ret ? : regs->gpr[11];
194}
195
196asmlinkage void do_syscall_trace_leave(struct pt_regs *regs)
197{
198 int step;
199
200 audit_syscall_exit(regs);
201
202 step = test_thread_flag(TIF_SINGLESTEP);
203 if (step || test_thread_flag(TIF_SYSCALL_TRACE))
204 tracehook_report_syscall_exit(regs, step);
205}