Name

tracehook_report_syscall_entry — task is about to attempt a system call

Synopsis

__must_check int tracehook_report_syscall_entry (struct pt_regs * regs);
 

Arguments

regs

user register state of current task

Description

This will be called if TIF_SYSCALL_TRACE has been set, when the current task has just entered the kernel for a system call. Full user register state is available here. Changing the values in regs can affect the system call number and arguments to be tried. It is safe to block here, preventing the system call from beginning.

Returns zero normally, or nonzero if the calling arch code should abort the system call. That must prevent normal entry so no system call is made. If task ever returns to user mode after this, its register state is unspecified, but should be something harmless like an ENOSYS error return. It should preserve enough information so that syscall_rollback can work (see asm-generic/syscall.h).

Called without locks, just after entering kernel mode.