函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\trace\trace_syscalls.c Create Date:2022-07-27 13:29:22
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:ftrace_syscall_enter

函数原型:static void ftrace_syscall_enter(void *data, struct pt_regs *regs, long id)

返回类型:void

参数:

类型参数名称
void *data
struct pt_regs *regs
longid
315  tr等于data
327  syscall_nr等于trace_get_syscall_nr(当前进程, regs)
328  如果syscall_nr小于0或syscall_nr大于等于NR_syscalls则返回
332  trace_file等于cu_dereference_sched() - fetch RCU-sched-protected pointer for dereferencing*@p: The pointer to read, prior to dereferencing* Makes rcu_dereference_check() do the dirty work.(enter_syscall_files[syscall_nr])
333  如果非trace_file则返回
336  如果race_trigger_soft_disabled - do triggers and test if soft disabled*@file: The file pointer of the event to test* If any triggers without filters are attached to this event, they* will be called here则返回
339  sys_data等于syscall_nr_to_meta(syscall_nr)
340  如果非sys_data则返回
343  size等于entry的长度加sizeof(unsignedlong)乘nb_args
345  local_save_flags(irq_flags)
346  pc等于抢占计数值
348  buffer等于buffer
349  event等于trace_buffer_lock_reserve(buffer, type, size, irq_flags, pc)
351  如果非event则返回
354  entry等于g_buffer_event_data - return the data of the event*@event: the event to get the data from
355  nr等于syscall_nr
356  syscall_get_arguments(当前进程, regs, args)
357  内存复制(args, args, sizeof(unsignedlong) * nb_args)
359  vent_trigger_unlock_commit - handle triggers and finish event commit*@file: The file pointer assoctiated to the event*@buffer: The ring buffer that the event is being written to*@event: The event meta data in the ring buffer*@entry: The event