Re: sys_enter tracepoint ctx structure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, Alexei!

>>>>> On Thu, 20 Apr 2023 08:59:09 -0700, Alexei Starovoitov  wrote:

 > On Thu, Apr 20, 2023 at 6:57 AM Yauheni Kaliuta <ykaliuta@xxxxxxxxxx> wrote:
 >> Hi!
 >> 
 >> Should perf_call_bpf_enter/exit (kernel/trace/trace_syscalls.c)
 >> use struct trace_event_raw_sys_enter/exit instead of locally
 >> crafted struct syscall_tp_t nowadays?


 > No. It needs syscall_tp_t.

 > test_progs's vmlinux test
 >> expects it as the context.
 >> 

 > what do you mean? Pls share a code pointer?

https://github.com/torvalds/linux/blob/master/tools/testing/selftests/bpf/progs/test_vmlinux.c#L19

SEC("tp/syscalls/sys_enter_nanosleep")
int handle__tp(struct trace_event_raw_sys_enter *args)

So, should it use different structure then? syscall_tp_t to be
declared publicly?

 >> 
 >> Or at least use struct trace_entry instead of struct pt_regs?
 >> 

 > no. It needs a pointer to pt_regs.
 > See all of the pe_* flavor of helpers.


 >> 
 >> I have a problem with one RT patch with extends trace_entry.
 >> 

 > Just extend it. It shouldn't matter.
 > I'm likely missing something.

Or me. Let's figure out :)

-- 
WBR,
Yauheni Kaliuta





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux