kernel/entry/syscall-common.c

Source file repositories/reference/linux-study-clean/kernel/entry/syscall-common.c

File Facts

System
Linux kernel
Corpus path
kernel/entry/syscall-common.c
Extension
.c
Size
525 bytes
Lines
24
Domain
Core OS
Bucket
Scheduler, Processes, Timers, Sync, And Syscalls
Inferred role
Core OS: syscall or user/kernel boundary
Status
core implementation candidate

Why This File Exists

Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.

Dependency Surface

Detected Declarations

Annotated Snippet

// SPDX-License-Identifier: GPL-2.0

#include <linux/entry-common.h>

#define CREATE_TRACE_POINTS
#include <trace/events/syscalls.h>

/* Out of line to prevent tracepoint code duplication */

long trace_syscall_enter(struct pt_regs *regs, long syscall)
{
	trace_sys_enter(regs, syscall);
	/*
	 * Probes or BPF hooks in the tracepoint may have changed the
	 * system call number. Reread it.
	 */
	return syscall_get_nr(current, regs);
}

void trace_syscall_exit(struct pt_regs *regs, long ret)
{
	trace_sys_exit(regs, ret);
}

Annotation

Implementation Notes